Trillet AI logo

Authorize Meta WhatsApp

Get the Meta OAuth authorization URL to connect a WhatsApp Business Account to your workspace.

GEThttps://api.trillet.ai/v1/api/meta-whatsapp/authorize

Open the returned URL in a browser popup and approve access. Meta then redirects back to Trillet. The connection is made at the workspace level, not per flow.

Choosing which WhatsApp Business Account and phone number to use, and attaching it to a message flow, is done in the portal. Those steps are not part of the public API yet.

Your role needs the workspace:edit permission. Otherwise the request fails with 403 {"error": "Insufficient permissions", "requiredPermission": "workspace:edit"}.

Headers

x-workspace-idstringrequired

The workspace to connect WhatsApp to.

Response Fields

authorizeUrlstring

The Meta OAuth authorization URL (Graph API v21.0, popup display). Open it in a browser to authorize the WhatsApp Business connection.

Errors

StatusBodyWhen
403{"error": "Insufficient permissions"}Your role lacks workspace:edit
500{"message": "Error generating Meta WhatsApp authorize URL"}Unexpected server error
{
  "authorizeUrl": "https://www.facebook.com/v21.0/dialog/oauth?client_id=...&redirect_uri=...&response_type=code&state=...&display=popup&config_id=..."
}

Last updated on