Check QR authentication
Checks the current result of a QR login flow until the provider reports success or failure. A pending QR returns the latest auth_payload.qr_code; WhatsApp can instead return passkey_required with auth_payload.public_key for the next WebAuthn step.
https://api.unifyport.ai/v1/accounts/{account_id}/auth/qr/checkHeaders
X-Api-KeyWorkspace API key. The workspace is resolved from this header.
Content-TypeUse application/json when sending a JSON request body.
Path parameters
account_idIdentifier used in the authentication route.
Request body
This endpoint accepts an empty JSON object; send {} exactly as shown in the request example.
Response body
providerProvider whose runtime handled the action.
enum: telegram, whatsapp, line, twitter, zalo, tiktok, whatsapp_protocol
actionRuntime action that was requested.
statusCurrent authorization flow status, for example pending_auth, awaiting_qr_scan, awaiting_code, pending, passkey_required, passkey_pending, passkey_confirmation, passkey_confirmation_sent, authorized, or failed.
auth_statusNormalized authentication state returned by the Passkey action.
auth_payloadobjectStandard payload needed for the current step. QR uses qr_code; code verification uses type=code; Passkey uses type=passkey and public_key. Mutually exclusive step payloads do not appear together.
auth_payloadStandard payload needed for the current step. QR uses qr_code; code verification uses type=code; Passkey uses type=passkey and public_key. Mutually exclusive step payloads do not appear together.
typePayload type for the current step; code identifies a verification-code step and passkey identifies a Passkey step.
qr_codeQR content to render only while auth_status is awaiting_qr_scan.
public_keyWebAuthn PublicKeyCredentialRequestOptions to pass to the browser credentials API when auth_status is passkey_required.
account_idProvider account this response refers to.
expires_atRFC3339 timestamp after which the current auth_payload is no longer valid.
Responses
200Request succeeded. See the example response body.
400The request body, path, or parameters are invalid.
401The X-Api-Key header is missing or invalid.
409The requested operation conflicts with an existing provider account or resource.
500The service encountered an unexpected error.
502The provider adapter or upstream provider could not complete the operation.
Request
curl -X POST https://api.unifyport.ai/v1/accounts/{account_id}/auth/qr/check \
-H "X-Api-Key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{}'Response
{
"data": {
"provider": "whatsapp",
"action": "check_qr_auth",
"status": "awaiting_qr_scan",
"auth_status": "awaiting_qr_scan",
"auth_payload": {
"qr_code": "<QR_CODE>"
}
}
}Response
{
"data": {
"provider": "whatsapp",
"action": "check_qr_auth",
"status": "passkey_required",
"auth_status": "passkey_required",
"auth_payload": {
"type": "passkey",
"public_key": {
"challenge": "<BASE64URL_CHALLENGE>"
}
}
}
}