Skip to Content
WhatsApp API by Retention Stack

Passkey linking

Finish linking when WhatsApp asks for a passkey.

On some accounts WhatsApp asks for a passkey after the QR scan. The session then reports PASSKEY_REQUIRED instead of WORKING.

A passkey is signed with WebAuthn, which only works in a browser on web.whatsapp.com. A server cannot do it, so a browser extension performs the signing step. Install it for Chrome, Edge or Brave or Firefox.

In the console

Open your session at /app. When the status is PASSKEY_REQUIRED the page shows Confirm with passkey. Install the WhatsApp browser extension if prompted, click the button, and tap your authenticator. The page then moves to connected.

With the API

Get the challenge

curl https://wp-rapidapi.retentionstack.agency/v1/SESSION_NAME/auth/passkey/challenge \
  -H "Authorization: Bearer ak_live_YOUR_ACCOUNT_KEY"

Returns 422 when no challenge is pending. The challenge also arrives as data on the session.status webhook.

Sign it in the browser

Pass the challenge object unchanged to the extension. It opens web.whatsapp.com, asks the user to confirm, and returns credential.toJSON().

Submit the assertion

curl -X POST https://wp-rapidapi.retentionstack.agency/v1/SESSION_NAME/auth/passkey \
  -H "Authorization: Bearer ak_live_YOUR_ACCOUNT_KEY" -H "Content-Type: application/json" \
  -d @assertion.json

Most sessions move to WORKING. Poll GET /v1/sessions/SESSION_NAME to confirm.

Rare: confirmation code

If the status becomes PASSKEY_CONFIRMATION_REQUIRED, call GET /auth/passkey/confirmation for a 4-digit code, check it matches the phone, then POST /auth/passkey/confirm.

Do not restart the session while waiting. A restart discards the pending challenge.

Was this page helpful?

On this page