Skip to content

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)

POST /v1/connect/whatsapp/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)

Request body

Content-Type: application/json

  • profileId (string) required — Your Zernio profile ID
  • accessToken (string) required — Permanent System User access token from Meta Business Suite
  • wabaId (string) required — WhatsApp Business Account ID from Meta
  • phoneNumberId (string) required — Phone Number ID from Meta WhatsApp Manager

Example:

json

{
  "profileId": "6507a1b2c3d4e5f6a7b8c9d0",
  "accessToken": "EAABsbCS...your-system-user-token",
  "wabaId": "123456789012345",
  "phoneNumberId": "987654321098765"
}

Responses

200 — WhatsApp connected successfully

  • message (string)
  • account (object)

400 — Invalid request. Either missing fields or the phoneNumberId was not found in the specified WABA. If the phone was not found, the response includes availablePhoneNumbers to help identify the correct ID.

401 — Invalid or expired access token

403 — Profile limit exceeded for this plan