Trillet AI logo

Install Meta Lead Ads

Get the Meta OAuth authorization URL to connect Meta Lead Ads to a call flow for automatic lead calling.

GEThttps://api.trillet.ai/v1/api/meta-lead/auth/install

Open the returned URL in a browser and approve access. Meta then redirects back to Trillet, which saves the Facebook user token on the call flow. After that, call Configure Meta Lead Ads to choose which pages and lead forms trigger calls.

Headers

x-workspace-idstringrequired

Workspace identifier for the API. The call flow must belong to this workspace (or one of its sub-workspaces).

Query Parameters

pathwayIdstringrequired

The _id of a saved call flow to connect Meta Lead Ads to.

Response Fields

urlstring

The Meta OAuth authorization URL (Graph API v21.0). Redirect the user to this URL to authorize the connection.

Errors

StatusBodyWhen
400{"error": "pathwayId is required"}No pathwayId
400{"error": "Flow must be saved before connecting Meta. Please save your flow first."}pathwayId isn't a valid ID
403{"error": "You do not have access to this workspace."}You aren't a member of the x-workspace-id workspace
403{"error": "Pathway does not belong to this workspace."}The flow belongs to another workspace
404{"error": "Pathway not found"}No call flow with that ID
{
  "url": "https://www.facebook.com/v21.0/dialog/oauth?client_id=...&redirect_uri=...&scope=...&state=..."
}

Last updated on