API Reference
Login and Embedded Signup

Exchange the code for a token

GET/oauth/access_token
Base URL: https://whatsapp.mimicr.dev/v24.0 · provider: https://graph.facebook.com/v24.0

Exchanges the code from the login dialog or from Embedded Signup for a business access token. With grant_type=fb_exchange_token and fb_exchange_token, it returns a long-lived token for an existing token. No Authorization header: authenticate with client_id and client_secret (POST with a form body is accepted too).

Authorization

Public route, no token.

Query parameters

client_idstringrequired

App ID.

client_secretstringrequired

App secret.

codestring

Code from the dialog or from FB.login.

redirect_uristring

Same redirect_uri used in the dialog, when there was one.

grant_typestring

fb_exchange_token to extend a token.

fb_exchange_tokenstring

Token to extend.

Responses

200Access token.
access_tokenstring

Access token of the chosen business.

token_typestring

bearer.

expires_ininteger

Lifetime in seconds.

400Invalid client_id (101), wrong client_secret (1), missing code (100) or invalid/expired code (100, subcode 36007).
errorobjectrequired
Show child attributes
messagestringrequired

Human-readable error message, for WhatsApp errors prefixed with (#code).

typestringrequired

Exception type.

Example: "OAuthException"
codeintegerrequired

Error code. See the error codes reference.

error_subcodeinteger

More specific code, when there is one (for example 33 for objects that do not exist or are not visible to the token, 460 for revoked tokens, 2388024 for duplicate templates).

error_user_titlestring

Title meant to be shown to the end user.

error_user_msgstring

Message meant to be shown to the end user.

error_dataobject
Show child attributes
messaging_productstring

Always whatsapp.

detailsstring

Details about the error.

fbtrace_idstringrequired

Trace ID. Include it when you contact support.