API Reference
AuthenticationPOST

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/check

Headers

X-Api-Key
stringrequired

Workspace API key. The workspace is resolved from this header.

Content-Type
stringrequired

Use application/json when sending a JSON request body.

Path parameters

account_id
stringrequired

Identifier used in the authentication route.

Request body

This endpoint accepts an empty JSON object; send {} exactly as shown in the request example.

Response body

provider
string

Provider whose runtime handled the action.

enum: telegram, whatsapp, line, twitter, zalo, tiktok, whatsapp_protocol

action
string

Runtime action that was requested.

status
string

Current 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_status
string

Normalized authentication state returned by the Passkey action.

auth_payload
object

Standard 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.

type
string

Payload type for the current step; code identifies a verification-code step and passkey identifies a Passkey step.

qr_code
string

QR content to render only while auth_status is awaiting_qr_scan.

public_key
object

WebAuthn PublicKeyCredentialRequestOptions to pass to the browser credentials API when auth_status is passkey_required.

account_id
string

Provider account this response refers to.

expires_at
string

RFC3339 timestamp after which the current auth_payload is no longer valid.

Responses

200
200 OK

Request succeeded. See the example response body.

400
Bad Request

The request body, path, or parameters are invalid.

401
Unauthorized

The X-Api-Key header is missing or invalid.

409
Conflict

The requested operation conflicts with an existing provider account or resource.

500
Internal Server Error

The service encountered an unexpected error.

502
Bad Gateway

The 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>"
      }
    }
  }
}