What is Facebook Login for Business?
Facebook Login for Business (FLfB) is the variant of Facebook Login that Meta built for apps acting on behalf of businesses rather than individual people. Instead of hard-coding a list of scopes, the developer creates a configuration in the App Dashboard that states which token the login should produce, which asset types the client will be asked to share (for WhatsApp, WhatsApp accounts) and which permissions are requested, such as whatsapp_business_management, whatsapp_business_messaging and business_management. Meta stores it and gives it an ID, the config_id.
For WhatsApp partners the configuration's login variation is WhatsApp Embedded Signup, and the token type is a system-user access token. When the partner's page calls FB.login with that config_id, response_type: 'code' and override_default_response_type: true, the client goes through Embedded Signup and the SDK hands back an authorisation code rather than a token. The partner's server then calls the OAuth endpoint with its app ID, app secret and the code, and receives a Business Integration System User access token tied to that client's business and the assets it shared.
The difference from Embedded Signup is one of layers. Embedded Signup is the onboarding experience the client sees: creating a WABA, choosing a number, verifying it. Facebook Login for Business is the authorisation machinery underneath: configurations, codes, token types and granted scopes. The same OAuth 2.0 authorisation-code pattern is used, but the result is a business-scoped credential that survives staff changes at the client, which a classic user access token does not.
Key takeaways
- Facebook Login for Business is the auth layer under Embedded Signup: a saved configuration that fixes the token type, assets and permissions an app asks for.
- Each configuration has a
config_id; you pass it toFB.logininstead of listing scopes in code. - With
response_type: 'code'the login returns a one-time code that your server swaps at/oauth/access_tokenwithin about 30 seconds. - The swap returns a Business Integration System User access token scoped to that client's assets, not a personal user token.
- Use
GET /debug_tokenand itsgranular_scopes.target_idsto learn exactly which WABAs a token can reach.
Send the code exchange and read the reply
https://graph.facebook.com/v26.0/oauth/access_token?client_id={APP_ID}&client_secret={APP_SECRET}&code=AQB7x...GET 200 in 450 ms(simulated)
Request
1 headerResponse
200 OKResponse: 200 OK after 450 ms.
Key facts at a glance
Facebook Login for Business: key facts and limits
- Configuration ID
- config_id, passed to FB.login
- Response type
- code (with override_default_response_type: true)
- Code lifetime
- About 30 seconds, single use
- Exchange endpoint
- GET /oauth/access_token
- Token produced
- Business Integration System User access token
- Scope inspection
- GET /debug_token → granular_scopes.target_ids
How does Facebook Login for Business work?
Create a configuration
In the App Dashboard open Facebook Login for Business, then Configurations, and create one with the WhatsApp Embedded Signup login variation, a system-user access token, WhatsApp accounts as the asset type and the WhatsApp permissions your product needs. Copy the resulting
config_id.Launch login with the config_id
Call
FB.login(callback, { config_id, response_type: 'code', override_default_response_type: true }). The configuration, not your code, decides what the client is asked to approve, so changing permissions means editing or replacing the configuration.Swap the code server-side
POST the code to your backend and call
GET https://graph.facebook.com/v26.0/oauth/access_tokenwithclient_id,client_secretandcode. The code is single-use and expires in about 30 seconds.Inspect what was granted
Call
GET /debug_token?input_token={BUSINESS_TOKEN}with an app token. Thegranular_scopesarray lists each permission withtarget_ids, the WABA IDs it covers; the most recently onboarded appear first.Store and use the business token
Encrypt the token at rest, key it to the client's WABA ID, and use it for that client's messaging and management calls. Never ship it to the browser and never reuse one client's token for another.
Facebook Login for Business in code
curl "https://graph.facebook.com/v26.0/oauth/access_token?client_id={APP_ID}&client_secret={APP_SECRET}&code={CODE}"# 200 OK# { "access_token": "EAAG...", "token_type": "bearer" }
Common wrong turns
Common mistakes with Facebook Login for Business
Using classic Facebook Login scopes
Passing
scope: 'whatsapp_business_management'without aconfig_idproduces a personal user token that expires and belongs to one employee. Always launch with a Facebook Login for Business configuration for client onboarding.Exchanging the code in the browser
The exchange needs your app secret, which must never reach a browser or mobile app. Send the code to your server and exchange it there, over TLS, immediately.
Trusting the front-end IDs
IDs from the session event can be spoofed or stale. Confirm the WABA appears in the token's
granular_scopesbefore writing it to your database.Editing permissions and forgetting existing clients
A new permission only applies to clients who log in again. Plan a reconnect flow and track which configuration version each client authorised.
Example: A SaaS team in Bengaluru adds a permission
A Bengaluru helpdesk SaaS launched with a configuration requesting only whatsapp_business_messaging. When it later built template management, calls to /{WABA_ID}/message_templates failed for every existing client. The fix was a new configuration that also requests whatsapp_business_management, approved in App Review at Advanced access, and a "Reconnect WhatsApp" button that relaunches login with the new config_id. After clients reconnected, debug_token showed the management scope with their WABA IDs in target_ids, and the feature worked.
Why does Facebook Login for Business matter?
Getting this layer right decides whether a partner's onboarding is secure and repeatable. A configuration keeps the requested permissions consistent across every client, the code-for-token exchange keeps the app secret on the server, and a business-scoped token means a client's integration does not break when the employee who clicked through the pop-up leaves. Getting it wrong produces the classic support tickets: tokens that expire, tokens that see the wrong WABA, and permissions that silently were never granted.
Good practice
Best practices for Facebook Login for Business
- Keep one configuration per product permission set and record the
config_ideach client used. - Alert when an exchange fails with an OAuth error: it usually means the code was reused or arrived late.
- Re-run
debug_tokenon a schedule to catch clients who removed your access.