WhatsApp Business

The WhatsApp Business connector lets AI agents send messages and media, manage message templates, and update the business profile — all through the WhatsApp Cloud API using OAuth 2.0. Your credentials are stored encrypted in MCPGate's vault and are never exposed to the AI client.

24-hour messaging window

WhatsApp Business only allows free-form text messages within 24 hours of the last customer message. Outside that window, you must use a pre-approved template via whatsapp_send_template. MCPGate does not enforce this window — your application logic must handle it.

Required scopes#

MCPGate requests the following WhatsApp Cloud API OAuth scopes when you connect a WhatsApp Business account.

ScopePurpose
whatsapp_business_messagingSend messages and media to users
whatsapp_business_managementManage templates and business profile

Tool reference#

The WhatsApp Business connector exposes 9 tools: 3 read, 5 write, and 1 delete. Use the MCP Apps page to enable or disable individual tools per app, and the Guardrails page to add fine-grained rules on top.

ToolCategoryDescription
whatsapp_get_message_statusreadGet the delivery status of a sent WhatsApp message
whatsapp_list_templatesreadList all message templates for the WhatsApp Business account
whatsapp_get_business_profilereadGet the WhatsApp Business profile information
whatsapp_send_messagewriteSend a WhatsApp text message to a phone number
whatsapp_send_templatewriteSend a pre-approved WhatsApp template message
whatsapp_send_mediawriteSend a media message (image, video, document, or audio) via WhatsApp
whatsapp_create_templatewriteCreate a new WhatsApp message template for approval
whatsapp_update_business_profilewriteUpdate the WhatsApp Business profile information
whatsapp_delete_templatedeleteDelete a WhatsApp message template

Common guardrail recipes#

Send-only access#

Enable read tools plus whatsapp_send_message, whatsapp_send_template, and whatsapp_send_media. Deny whatsapp_create_template, whatsapp_update_business_profile, and whatsapp_delete_template. This lets the agent communicate with users without being able to change account-level settings.

Template-only messaging#

Enable only whatsapp_list_templates and whatsapp_send_template. Deny whatsapp_send_message and whatsapp_send_media. This ensures all outgoing messages use pre-approved templates, which is required for proactive outreach outside the 24-hour window.

Restrict recipients#

Apply the allow_values template to whatsapp_send_message, whatsapp_send_template, and whatsapp_send_media, targeting the to field. Provide a list of allowed phone numbers in E.164 format so the agent can only message approved contacts.

Troubleshooting#

  • Message rejected with error 131047 — The recipient has not messaged your business in the last 24 hours and you are not using a template. Switch to whatsapp_send_template with a pre-approved template.
  • Template creation pending approval — New templates created via whatsapp_create_templatego through Meta's review process (typically minutes to hours). The template cannot be sent until its status is APPROVED.
  • Media send failswhatsapp_send_mediarequires a publicly accessible media URL. Ensure the file is reachable by Meta's servers without authentication.