Connect WhatsApp from Embedded Signup
Exchange the authorization code Meta's Embedded Signup popup returned. This is the call the Zernio-hosted
signup page makes after the popup closes (GET /v1/connect/whatsapp?signup=hosted), sending the wabaId
and phoneNumberId Meta reported so exactly the chosen number is connected; when both are omitted the
first number the token can see is used. The code never passes through a redirect_uri, so
POST /v1/connect/{platform} cannot accept it. Authenticates with an API key, or with the connect token
the hosted flow issues (X-Connect-Token header).
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Header Parameters
Connect token issued by the hosted signup flow, accepted instead of an API key.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
{ "message": "string", "account": { "accountId": "string", "platform": "whatsapp", "username": "string", "displayName": "string", "isActive": true, "selectedPhoneNumber": "string" }, "redirectUrl": "string"}Connect WhatsApp via credentials
Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number) Warning: connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.
Get Embedded Signup SDK config
The Meta app id and Embedded Signup configuration id the Zernio-hosted signup page uses to open Meta's popup. Integrators do not need this endpoint: start the hosted flow with `GET /v1/connect/whatsapp?signup=hosted` and send the user to the returned `authUrl`. Authenticates with an API key or with the connect token the hosted flow issues (`X-Connect-Token` header).