go-whatsapp
go-whatsapp copied to clipboard
#581: Increasing QR code timeout ttl
The timeout of the QR is derived from the response. You can't just configure it as you wish :O
The timeout of the QR is derived from the response. You can't just configure it as you wish :O
Oh really... the timeout may be more than 20 seconds specified in the response then because I've tried logging in after the 1 minute mark using the PR and it worked @AlmogBaku
Maybe it's still valid for a while after the TTL, but there is no way to ensure that. The best way to handle it is to refresh the QR code.
This is also the way Whatsapp web behave - refreshing the QR every 20 seconds
Maybe it's still valid for a while after the TTL, but there is no way to ensure that. The best way to handle it is to refresh the QR code.
This is also the way Whatsapp web behave - refreshing the QR every 20 seconds
I see what you mean. To that regard, is there anyway to get that refresh without exiting the terminal. The project I intend to use this for doesn't ensure scan will happen after 20 seconds
You need to build it on your own. For production use-cases it's better to use a different "qr encoding" mechanism.
I built mine with skip2/go-qrcode
and gorilla/websocket