SuperdindaDocs
Consents

Pair this phone by code (public)

POST
/consent-requests/{token}/pairing

After consent is given on this link: opens (or resumes) a WhatsApp pairing whose 8-character code is shown only here, never to the guardians. The person types it in WhatsApp → Aparelhos conectados → Conectar com número de telefone. Idempotent: while a code is valid the same one comes back; an attempt that ran out is replaced; a pairing the guardian opened with a QR is switched to the code. The code may arrive a moment later — read GET …/pairing or the stream GET …/events. Needs the guardian to have enabled WhatsApp on the seat. No body.

Path Parameters

token*string

the opaque token from the link

Length16 <= length <= 4096

Response Body

The pairing as this page shows it

application/json
  1. response
success*true
Value intrue
data*
Example Request
curl -X POST 'http://localhost:3000/consent-requests/stringstringstri/pairing'
Example Response
{  "success": true,  "data": {    "phoneMasked": "string",    "pairing": {      "status": "starting",      "method": "qr",      "challengeShownTo": "guardian",      "challenge": {        "kind": "code",        "code": "string",        "expiresAt": "2019-08-24T14:15:22Z"      },      "failure": "expired",      "pairedAt": "2019-08-24T14:15:22Z",      "endedAt": "2019-08-24T14:15:22Z"    }  }}