Connect WhatsApp
Get the Cloud API channel
Returns which connection is active (meta or scan) and, for the Cloud API, the connected numbers. Access tokens and app secrets are never returned.
- Bearer API key
- Scope:
reador write - or app session
- Workspace:
X-Tenant-ID(optional with a key)
Headers
AuthorizationstringrequiredYour API key as
Bearer <key>. The wordBearerand the space are case-sensitive. Browser clients signed in to the app use the session cookie instead.X-Tenant-IDuuidoptionalWorkspace id. Optional with an API key (a key always acts in its own workspace); if you send it, it must match the key’s workspace. Required with a session cookie. You can pass
?tenant=<id>instead.
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.
Status codes
- 200OK. The channel configuration.
- 401Unauthorized. The API key is unknown, revoked or expired (
invalid or expired API key), or there is no key and no signed-in session (unauthorized). - 402Payment required. Only when subscriptions are enforced and the workspace has no active subscription. The body includes
code: "payment_required". - 403Forbidden. The
X-Tenant-IDheader ortenantquery does not match the API key’s workspace (API key belongs to a different workspace), or a signed-in user is not a member of the workspace (forbidden). - 500Server error. Something went wrong on our side. Retry with backoff.
Response for a workspace without a Cloud API number
{
"configured": false,
"active": "scan",
"webhook_path": "/api/webhooks/meta",
"webhook_managed": true,
"live_send": true
}