JavaScript SDK: swarmhit.whatsappAccounts.getLink(whatsappAccountId)
Where a link stands: pending with the current checkpoint (the QR changes about every 20 seconds), expired (nothing was scanned in time: POST /whatsapp-accounts/{id}/relink), active with the number, or error with its code (duplicate: the number is already linked). A first link left waiting, expired or failed for 2 hours is cancelled: the number is gone.
Authorization
bearerAuth AuthorizationBearer <token>
An API key created on the Access tokens page.
In: header
Path Parameters
id*string
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/whatsapp-accounts/string/link"{ "data": { "status": "pending", "checkpoint": { "type": "qr", "qrImage": "string", "code": "string", "expiresAt": "2019-08-24T14:15:22Z" }, "accountId": "string", "phoneNumber": "string", "name": "string", "merged": true, "paired": true, "reason": "string", "code": "string", "message": "string" }}