PeumeAPI

Social publishing & inbox · WhatsApp

Connect WhatsApp from Embedded Signup

Exchange the authorization code Meta's Embedded Signup popup returned.

$0.002 per callRuns on an account you connect

Call it

curl https://api.peume.com/v1/call/connect-whatsapp-from-embedded-signup \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "code": "your code"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: connect-whatsapp-from-embedded-signup.

Parameters

codeRequiredstring

Authorization code from the WA_EMBEDDED_SIGNUP postMessage

wabaIdstring

WhatsApp Business Account id, when the SDK reported one

phoneNumberIdstring
isCoexistenceboolean

Number is also live in the WhatsApp Business app

expectedPhoneNumberstring

Rejects the connect when Meta returns a different number (full international number). With a connect token minted with a pinned number, the pinned number applies instead.

redirect_urlstring

Hosted signup page only. When present, the response also carries `redirectUrl`, the URL the user should land on, with the outcome mapped exactly like the redirect flow (success params, or `error` and `platform` with the same values). Must be an absolute http(s) URL or a custom app scheme. The legacy spelling `redirectUrl` remains accepted as an alias.

echoConnectTokenboolean

Hosted signup page only. Append the connect token to the success redirect, as the redirect flow does for API-key callers.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.