Creating a Meta OAuth app for the WhatsApp Business Platform
This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.
Distilled from Meta’s own documentation: Facebook Login for Business, Manually build a login flow, Long-lived access tokens, WhatsApp Embedded Signup, Permissions reference. Retrieved 2026-07-03.
Important: Facebook Login for Business — “the preferred authentication and authorization solution for tech providers building integrations with Meta’s business tools” — is available only to Business-type apps, and WhatsApp integrations require one. WhatsApp Embedded Signup (the flow that onboards a customer’s WhatsApp Business Account into your app) is built on Facebook Login for Business and the Meta JavaScript SDK.
- Create a Business-type app in the Meta App Dashboard and connect it to your verified Meta business portfolio.
- Add the Facebook Login for Business product (and the WhatsApp product for Cloud API use) to the app.
- Register your callback URL under Facebook Login for Business → Settings → Valid OAuth Redirect URIs.
- Create a configuration in the App Dashboard: choose the token type — a User access token (short-lived, for real-time actions on input from the user) or a Business Integration System User access token (for programmatic, automated actions on clients’ assets; defaults to never expire, optionally 60 days) — plus the assets and permissions the app needs. Note the generated config_id.
- Request Advanced Access via App Review for the permissions you need (
whatsapp_business_messaging,whatsapp_business_management,business_management); Business Verification is required for all Advanced Access requests. - Send the user to
https://www.facebook.com/v25.0/dialog/oauthwithclient_id,redirect_uri,state, and yourconfig_id. Meta: “config_id has replaced scope (which should not be used)” — only consumer Facebook Login apps still passscope(comma- or space-separated permissions). - Exchange the returned
codeathttps://graph.facebook.com/v25.0/oauth/access_tokenwithclient_id,redirect_uri,client_secret, andcodeas request parameters. The response is{access_token, token_type, expires_in}— Meta never returns a refresh token. - For user tokens: exchange the short-lived token server-side for a long-lived token (about 60 days) at the same endpoint with
grant_type=fb_exchange_token,client_id,client_secret, and the current token infb_exchange_token. Re-exchange before expiry — an expired token cannot be exchanged, and the call must stay server-side because it carries the app secret. - For Embedded Signup: the flow returns the customer’s WABA ID, business phone number ID, and an exchangeable token code; exchange the code server-to-server for a customer-scoped business token using the same authorization-code exchange as step 7.
- Inspect any token at
GET https://graph.facebook.com/v25.0/debug_token?input_token={token}(authenticated with an app access token) to confirm validity, scopes, and expiry.
Connect it to Publicus
Section titled “Connect it to Publicus”Open Connections under Credentials, choose Meta, and pick Meta OAuth 2.0 (Facebook Login / Facebook Login for Business). Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.
See also: Meta in the catalog.
This guide is maintained by Publicus and published under CC BY 4.0.