testWhatsAppConnection
Requires permission settings:integration:update.
Checks the stored API key against the WhatsApp provider and records the connection as verified when it works. Fails with the provider's reason when it does not. Requires permission to update integrations.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation TestWhatsAppConnection {
testWhatsAppConnection {
id
defaultCountryCode
channelName
displayName
apiKeyLast4
channelId
capabilities {
createTemplate
requiresChannel
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation TestWhatsAppConnection {\n testWhatsAppConnection {\n id\n defaultCountryCode\n channelName\n displayName\n apiKeyLast4\n channelId\n capabilities {\n createTemplate\n requiresChannel\n }\n }\n}"
}
EOF
Response:
{
"data": {
"testWhatsAppConnection": {
"id": "id",
"defaultCountryCode": "string",
"channelName": "string",
"displayName": "string",
"apiKeyLast4": "string",
"channelId": "string",
"capabilities": {
"createTemplate": true,
"requiresChannel": true
}
}
}
}
testWhatsAppConnection(
provider: WhatsAppProvider
): WhatsAppConfigGql!
Arguments
testWhatsAppConnection.provider ● WhatsAppProvider enum
The WhatsApp provider to use. Omit it to use the organization's enabled provider, else its most recently edited one.
Type
WhatsAppConfigGql object
The organization's WhatsApp setup. The API key is never returned in full.