get-whatsapp-connection
Read the connection state of a WhatsApp connector that connect-whatsapp created, without changing it. Needs the fabric:orchestrate.read grant.
curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
-H "authorization: Bearer $FABRIC_API_KEY" \
-H "Mcp-Session-Id: $MCP_SESSION_ID" \
-H "content-type: application/json" -H "accept: application/json" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get-whatsapp-connection","arguments":{"connector_id":"6b0f2c9e4a1d8e7f3c2b1a90"}}}'{
"content": [
{
"type": "text",
"text": "{\"lifecycle_id\":\"qlc_000005\",\"result\":{\"connector_id\":\"6b0f2c9e4a1d8e7f3c2b1a90\",\"name\":\"Support WhatsApp\",\"status\":\"pending\",\"connected\":false}}"
}
],
"isError": false
}Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
connector_id | string | Required | The connector_id that connect-whatsapp returned. A string. One that is not a WhatsApp connector this project may use is refused (403). |
Show full response
An example response, for a connector whose QR code has not been scanned yet.
{
"content": [
{
"type": "text",
"text": "{\"lifecycle_id\":\"qlc_000005\",\"result\":{\"connector_id\":\"6b0f2c9e4a1d8e7f3c2b1a90\",\"name\":\"Support WhatsApp\",\"status\":\"pending\",\"connected\":false,\"next_step\":\"The account is not linked yet. Call complete-whatsapp-connection with connector_id 6b0f2c9e4a1d8e7f3c2b1a90 to check again and get a new QR link.\"}}"
}
],
"isError": false
}Keeping the lifecycle_id is what lets you ask later why a call was allowed, refused or held.
More details
Response fields
connector_id: The connector you asked about.name: The connector's name.status:pendingwhile the account is not linked,readyonce it is.connected:truewhen the WhatsApp account is linked, whateverstatussays.next_step: What to do next, in words.
This call reads the connector only, so it never returns connect_url, link_type or link_expires_at. To get a
link for a pending connector, call complete-whatsapp-connection. The connector's configuration, and the PIN in
it, is never returned.
connected says whether the WhatsApp account is linked. status is the connector's own status: pending until the account is linked, then ready, or failed when a later data sync of the linked connector failed. A failed connector is still connected, and its actions still run; next_step says so, and sync-connector runs the sync again.
A pending connector stays pending until complete-whatsapp-connection is called after the scan. WhatsApp's provider may also report the scan to the platform on its own, which turns the connector ready without that call, but do not count on it: call complete-whatsapp-connection once the code is scanned.
A connector that is not linked yet is not an error. It comes back with status: "pending". This call never issues a link, so it is safe to poll, and both SDKs poll it when they wait for a scan. It never returns connect_url, link_type or link_expires_at: to get a link for a pending connector, call complete-whatsapp-connection. The connector's configuration, and the PIN in it, is never returned.
The connector id in the example is illustrative. Swap it for the one connect-whatsapp returned to you.
Reading the state needs only fabric:orchestrate.read, so a key that watches a connection does not need the power to start one. Not marked consequential.
Every tool call works the same way: How every tool call works.