whatsAppConfig
Requires permission settings:integration:read.
Returns the organization's WhatsApp configuration, or null when none exists. The API key is never returned. Requires permission to read 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
query WhatsAppConfig {
whatsAppConfig {
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": "query WhatsAppConfig {\n whatsAppConfig {\n id\n defaultCountryCode\n channelName\n displayName\n apiKeyLast4\n channelId\n capabilities {\n createTemplate\n requiresChannel\n }\n }\n}"
}
EOF
Response:
{
"data": {
"whatsAppConfig": {
"id": "id",
"defaultCountryCode": "string",
"channelName": "string",
"displayName": "string",
"apiKeyLast4": "string",
"channelId": "string",
"capabilities": {
"createTemplate": true,
"requiresChannel": true
}
}
}
}
whatsAppConfig(
provider: WhatsAppProvider
): WhatsAppConfigGql
Arguments
whatsAppConfig.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.