List numbers for selection
Fetch the WhatsApp phone numbers available across the user's WhatsApp Business Accounts (WABAs) after a headless OAuth flow.
WhatsApp OAuth grants access at the WABA level. When a connected WABA has 2 or more phone numbers, you must call this endpoint to list them and then POST /v1/connect/whatsapp/select-phone-number to bind one to the Zernio profile. Single-phone WABAs auto-complete during the OAuth callback and never reach this endpoint.
Use the profileId and tempToken returned in the headless redirect (step=select_phone_number).
Alternative: if you already know wabaId and phoneNumberId (e.g. from Meta Business Suite), use connectWhatsAppCredentials instead, which skips this two-step flow.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
The Zernio profile ID from the headless redirect
The temporary access token from the headless redirect
Header Parameters
Alternative auth for API users' end customers (used when the bearer token is scoped to a different user)
Response Body
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.listWhatsAppPhoneNumbers({ query: { profileId: 'profile_abc123', tempToken: 'tok_abc123', },});console.log(data);{
"phoneNumbers": [
{
"id": "1875844705851813",
"display_phone_number": "+55 83 8793-2039",
"verified_name": "Bioface",
"quality_rating": "GREEN",
"name_status": "APPROVED",
"messaging_limit_tier": "TIER_1K",
"wabaId": "317766992490131",
"wabaName": "Bioface WABA"
}
]
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}Connect WhatsApp via credentials POST
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)
Complete number selection POST
Bind a specific WhatsApp phone number to the Zernio profile after the user picks one from `listWhatsAppPhoneNumbers`. Exchanges the short-lived OAuth token for a long-lived token, subscribes the WABA to webhooks, and creates the SocialAccount.