At a glance
Capabilities
What you need
- A WhatsApp Business phone number that is not registered on the consumer WhatsApp app. A number the business uses in the WhatsApp Business app can keep running there: see Keep using the WhatsApp Business app. During Embedded Signup you can select an existing number or create one.
- Admin access to a Meta Business portfolio (business.facebook.com).
Connect an account
WhatsApp connects like every other platform with a consent screen: your backend asks for anauth_url, you send your customer there, and they come back to your redirect_uri with the connected account. Meta’s signup runs on Meta’s own pages, so there is nothing to embed or host on your side and no domain to register: it works from any domain. Your API key stays on your backend the whole time. You can also connect from the SocialAPI dashboard.
1
Get the signup link (your backend)
redirect_uri: it is where your customer lands with the result, and the only way to receive the number choice described below. See Redirect URI rules. state is optional and comes back unchanged on the redirect.onboarding picks the signup Meta shows:2
Send your customer to auth_url (browser)
Redirect the browser to
auth_url, or open it in a new tab. Your customer signs in with Facebook, picks or creates their business portfolio, WhatsApp Business Account and phone number, and verifies the number if it is new.3
Read the result on your redirect_uri
On success, your customer lands on your
redirect_uri with the account appended:account_id is the ID every WhatsApp call takes from here on. The number’s messages now arrive in your inbox.On failure, the redirect carries status=error with error and error_description. The WhatsApp-specific values are:See Redirect parameters for the full list.
Choose a number
When the WhatsApp Business Account holds more than one phone number, the redirect carriesstatus=selection_required and a connection_id instead of an account_id. Read the numbers with GET /v1/accounts/pending/{connection_id}:
profiles is one number: platform_account_id is its phone number ID, display_name the verified business name, and username the phone number. Connect one with POST /v1/accounts/pending/{connection_id}/select:
Keep using the WhatsApp Business app
To connect a number the business already uses in the WhatsApp Business app, and keep using it there, send"onboarding": "business_app" in step 1. Meta then walks your customer through linking the app, including scanning a QR code with their phone. The phone needs WhatsApp Business app 2.24.17 or later, and Meta decides during signup whether the number is eligible.
Once the number is connected:
- The chat history the business chooses to share in the app (up to 6 months) appears in its conversations as WhatsApp delivers it. Imported messages raise no webhook events, and their attachments carry
attachment_typewithout anattachment_url. - Messages the business sends from the phone app appear in the conversation and raise
dm.sent, like messages sent through the API. - Sending is capped at 20 messages per second, Meta’s fixed limit for these numbers.
- The number is already verified and registered, so you never call
request-code,verify-codeorregisterfor it: each refuses it with409 whatsapp.business_app_number.statusreturns"business_app": true,"verified": trueand"registered": true. This also applies to a number connected from the dashboard, so readbusiness_appfromstatusto tell which kind of number an account holds. - Meta refuses
deregisterfor these numbers. When SocialAPI has no specific code for Meta’s refusal, the call returns503 platform.whatsapp.api_error, anderror.meta.platform_codeholds Meta’s numeric error code. The business disconnects the number from the WhatsApp Business app’s settings.
Messages
Receiving, replying, media, buttons and lists, the 24-hour service window, and template messages are on WhatsApp messages. A free-form reply works within 24 hours of the person’s last message, and an approved template reaches the person at any time.Phone numbers and business profile
These endpoints manage the connected number and its public business profile. On the phone number endpoints,{account_id} is the connected account ID. On the business profile endpoints, {phone_number_id} is the WhatsApp phone number ID.
A number with
registered: true can send and receive messages. Keep the PIN you set with register: losing it means a 7-day wait before it can be reset. The request and response schemas are in the API reference.
Scopes
Embedded Signup asks the person connecting for these Meta permissions:
The account permissions WhatsApp supports are
messages.read and messages.write: see Account permissions.
Webhook events
The payloads are in Webhook events.
Related
- WhatsApp messages: replies, media, interactive messages, and templates.
- Connect accounts: the connect flow every platform shares.
- Direct messages: the inbox endpoints every platform shares.
- Plans: template sends need a paid plan.
- Supported platforms: compare WhatsApp with the other platforms.
- Errors: every WhatsApp error code.