Connect WhatsApp
Save Cloud API credentials
Checks the credentials with Meta and, if Meta confirms the phone number belongs to the WhatsApp Business Account, stores them encrypted. This is the manual alternative to the guided Meta signup in the app. Owners and admins only.
- Console only: owner or admin
- Workspace:
X-Tenant-ID
Headers
CookiestringrequiredThe
whatsappx_sessioncookie the app sets when you sign in. Browsers send it automatically; API keys are not accepted on this endpoint.X-Tenant-IDuuidrequiredWorkspace id. Required for session requests. You can pass
?tenant=<id>instead.
Body
application/jsonphone_idstringrequiredMeta phone number id.
waba_idstringrequiredWhatsApp Business Account id.
phonestringoptionalPhone number to display.
tokenstringrequiredPermanent access token from Meta.
secretstringoptionalMeta app secret, used to verify Meta’s webhook signatures. Required unless whatsappx.si manages the webhook (
webhook_managed).versionstringoptionalGraph API version.
Response
200 OKapplication/json
configuredbooleantruewhen at least one Meta (Cloud API) number is connected.activeenummetawhen a Cloud API number is connected, otherwisescan.iduuidmay be absentId of the primary Meta channel.
providerstringmay be absentmetafor the primary channel.phone_idstringmay be absentMeta phone number id of the primary channel.
waba_idstringmay be absentWhatsApp Business Account id of the primary channel.
phonestringmay be absentPhone number of the primary channel.
versionstringmay be absentGraph API version of the primary channel.
webhook_pathstringmay be absentCallback path Meta should call, for example
/api/webhooks/meta.webhook_urlstringmay be absentFull callback URL, when the public URL is configured.
webhook_managedbooleantruewhen whatsappx.si manages the Meta app and webhook subscription for you.live_sendbooleanMessages are sent for real (always
true).channelsarray<object>may be absentAll connected Meta numbers.
Show child attributesHide child attributes5
iduuidChannel id.
phone_idstringMeta phone number id.
waba_idstringWhatsApp Business Account id.
phonestringDisplay phone number saved for the channel.
versionstringGraph API version, for example
v23.0.
verify_tokenstringmay be absentWebhook verify token (
verify_+ hex), shown once.
Status codes
- 200OK. The saved channel configuration.
verify_tokenis included once when a new webhook verify token was generated; enter it in the Meta app’s webhook settings. - 400Bad request. Validation or Meta check failed, for example
Phone number ID and WABA ID must be 5 to 30 digits,Enter the permanent access token from Meta (at least 20 characters),API version must look like v23.0,Enter the Meta app secret (at least 16 characters), or a message starting withMeta rejected these credentials:. Errors from Meta addmeta_code. - 502Bad gateway. Meta returned a server error while checking the credentials. Retry later.
- 401Unauthorized. No signed-in session (
unauthorized). - 403Forbidden. API keys can never call this endpoint (
API keys cannot administer workspaces). A signed-in user who is not an owner or admin getsadmin required; a user who is not a member of the workspace getsforbidden.