View as Markdown

WhatsApp Business Integration

Send WhatsApp messages and templates

The WhatsApp Business integration provides access to send WhatsApp messages and templates through the Integrate MCP server.

Installation

The WhatsApp Business integration is included with the SDK:

import { whatsappIntegration } from "integrate-sdk/server";

Setup

1. Create a WhatsApp Business OAuth App

  1. Go to Meta for Developers
  2. Create a new OAuth application
  3. Configure your redirect URI
  4. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the WhatsApp Business integration to your server configuration. The integration automatically reads WHATSAPP_CLIENT_ID and WHATSAPP_CLIENT_SECRET from your environment variables:

import { createMCPServer, whatsappIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    whatsappIntegration({
    }),
  ],
});

You can override the environment variables by passing explicit values:

whatsappIntegration({
  clientId: process.env.CUSTOM_WHATSAPP_ID,
  clientSecret: process.env.CUSTOM_WHATSAPP_SECRET,
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";
 
await client.authorize("whatsapp");
const result = await client.whatsapp.sendMessage({
  phone_number_id: "value",
});
 
console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, whatsappIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [whatsappIntegration()],
});

Configuration Options

export interface WhatsAppIntegrationConfig {
  /** WhatsApp OAuth client ID (defaults to WHATSAPP_CLIENT_ID env var) */
  clientId?: string;

Tools

whatsapp_send_message

Send a plain text message

export interface WhatsappSendMessageParams {
    /** Sending phone number ID */
    phone_number_id: string;

whatsapp_reply_message

Reply to a specific message (quoted reply)

export interface WhatsappReplyMessageParams {
    /** Sending phone number ID */
    phone_number_id: string;

whatsapp_send_template

Send a pre-approved template message

export interface WhatsappSendTemplateParams {
    /** Sending phone number ID */
    phone_number_id: string;

whatsapp_send_media

Send an image, video, document, or audio file by URL

export interface WhatsappSendMediaParams {
    /** Sending phone number ID */
    phone_number_id: string;

whatsapp_send_reaction

React to a message with an emoji

export interface WhatsappSendReactionParams {
    /** Sending phone number ID */
    phone_number_id: string;

whatsapp_send_location

Send a location pin

export interface WhatsappSendLocationParams {
    /** Sending phone number ID */
    phone_number_id: string;

whatsapp_send_contact

Send one or more vCard-style contact cards

export interface WhatsappSendContactParams {
    /** Sending phone number ID */
    phone_number_id: string;

whatsapp_send_interactive_buttons

Send a message with up to 3 quick-reply buttons

export interface WhatsappSendInteractiveButtonsParams {
    /** Sending phone number ID */
    phone_number_id: string;

whatsapp_send_interactive_list

Send a message with a scrollable list of options

export interface WhatsappSendInteractiveListParams {
    /** Sending phone number ID */
    phone_number_id: string;

whatsapp_mark_read

Mark a received message as read (shows blue ticks to sender)

export interface WhatsappMarkReadParams {
    /** Your phone number ID */
    phone_number_id: string;

whatsapp_get_media_url

Get the download URL and metadata for a received media object

export interface WhatsappGetMediaUrlParams {
    /** Media object ID (from webhook payload) */
    media_id: string;

whatsapp_delete_media

Delete an uploaded media object from Meta's servers

export interface WhatsappDeleteMediaParams {
    /** Media object ID */
    media_id: string;

whatsapp_list_templates

List all message templates for a WhatsApp Business Account

export interface WhatsappListTemplatesParams {
    /** WABA ID */
    business_account_id: string;

whatsapp_get_template

Get a specific template by name

export interface WhatsappGetTemplateParams {
    /** WABA ID */
    business_account_id: string;

whatsapp_create_template

Create a new message template (submitted for Meta review)

export interface WhatsappCreateTemplateParams {
    /** WABA ID */
    business_account_id: string;

whatsapp_delete_template

Delete a template by name (all language variants)

export interface WhatsappDeleteTemplateParams {
    /** WABA ID */
    business_account_id: string;

whatsapp_get_phone_numbers

List all phone numbers registered to a WABA

export interface WhatsappGetPhoneNumbersParams {
    /** WABA ID */
    business_account_id: string;

whatsapp_get_phone_number

Get full details for a specific phone number

export interface WhatsappGetPhoneNumberParams {
    /** Phone number ID */
    phone_number_id: string;

whatsapp_get_profile

Get the public business profile for a phone number

export interface WhatsappGetProfileParams {
    /** Phone number ID */
    phone_number_id: string;

whatsapp_update_profile

Update the business profile (pass only the fields you want to change)

export interface WhatsappUpdateProfileParams {
    /** Phone number ID */
    phone_number_id: string;

whatsapp_get_message_status

Get status of a sent message by message ID

export interface WhatsappGetMessageStatusParams {
    /** The wamid of the message */
    message_id: string;

whatsapp_create_qr_code

Create a QR code that opens a chat with a prefilled message

export interface WhatsappCreateQrCodeParams {
    /** Phone number ID */
    phone_number_id: string;

whatsapp_update_qr_code

Update qr code

export interface WhatsappUpdateQrCodeParams {
    phone_number_id: string;

whatsapp_list_qr_codes

List all QR codes for a phone number

export interface WhatsappListQrCodesParams {
    /** Phone number ID */
    phone_number_id: string;

whatsapp_get_qr_code

Get qr code

export interface WhatsappGetQrCodeParams {
    phone_number_id: string;

whatsapp_delete_qr_code

Delete qr code

export interface WhatsappDeleteQrCodeParams {
    phone_number_id: string;

Notes

  • Category: Communication
  • Authentication mode: OAuth