devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click! Two engines: chromium-based WEBJS and pure-websocket NOWEB
https://waha.devlike.pro/
Apache License 2.0
878 stars 273 forks source link

Gets couldn't link device try again later while scanning QR #170

Closed khushboo-scogo closed 1 year ago

khushboo-scogo commented 1 year ago

@allburov If I call the screenshot api and do not scan the qr for the first time. Now, session status is scan_qr_code. If I hit the screenshot api again and try to scan with this new QR, it shows couldn't link device try again later. image

Sometimes it does get the QR scanned successfully and sometimes it didn't. This tends to increase inconsistency while using this. Can you help me with the cause, like why this is happening and also with a guided solution to this issue please.

Thank you in advance

allburov commented 1 year ago

Hi! If you're using WEBJS engine (it's default engine) and you see the original screenshot from WhatsApp Web and scan QR from that - I think there's nothing from our side that we could do :(

You can try to use "Link with phone number instead" - the code doesn't expire so fast as QR does https://waha.devlike.pro/docs/how-to/sessions/#get-pairing-code

https://github.com/devlikeapro/whatsapp-http-api/issues/154#issuecomment-1676357464

allburov commented 1 year ago

So the flow would be:

  1. Start a session
  2. POST /api/{session}/auth/request-code with your phone number
  3. Input the code on your phone with "Link with phone number instead"
  4. Profit