Skip to content

Concept map· 6 connected terms

Facebook Login for Business

Also called: FLfB · Login for Business · Facebook Login configuration · config_id

In one line
Meta's business-grade login product whose saved configuration (`config_id`) defines the token, assets and permissions a partner app requests from a client.

Reviewed

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 to FB.login instead of listing scopes in code.
  • With response_type: 'code' the login returns a one-time code that your server swaps at /oauth/access_token within 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_token and its granular_scopes.target_ids to learn exactly which WABAs a token can reach.

Send the code exchange and read the reply

2 / 2
GEThttps://graph.facebook.com/v26.0/oauth/access_token?client_id={APP_ID}&client_secret={APP_SECRET}&code=AQB7x...

GET 200 in 450 ms

Request

1 header
GET /v26.0/oauth/access_token?client_id={APP_ID}&client_secret={APP_SECRET}&code=AQB7x... HTTP/1.1
Host: graph.facebook.com

Response

200 OK
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "EAAGm0PX4ZCpsBO...",
"token_type": "bearer"
}
Try another response
Press Send to swap an Embedded Signup code for a business token. Toggle the alternatives to see what a reused or expired code, or a wrong app secret, returns.

Response: 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?

  1. 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.

  2. 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.

  3. Swap the code server-side

    POST the code to your backend and call GET https://graph.facebook.com/v26.0/oauth/access_token with client_id, client_secret and code. The code is single-use and expires in about 30 seconds.

  4. Inspect what was granted

    Call GET /debug_token?input_token={BUSINESS_TOKEN} with an app token. The granular_scopes array lists each permission with target_ids, the WABA IDs it covers; the most recently onboarded appear first.

  5. 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 a config_id produces 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_scopes before 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_id each client used.
  • Alert when an exchange fails with an OAuth error: it usually means the code was reused or arrived late.
  • Re-run debug_token on a schedule to catch clients who removed your access.

Facebook Login for Business FAQs

What is the difference between Facebook Login and Facebook Login for Business?+
Facebook Login authenticates a person and returns a user token; Facebook Login for Business authorises an app on behalf of a business through a saved configuration. The latter can return system-user tokens scoped to the business's shared assets, which keep working when staff change.
Where do I find my config_id?+
In the App Dashboard under Facebook Login for Business, then Configurations. Each saved configuration shows its ID; pass that value as `config_id` to `FB.login` when launching Embedded Signup.
Does the business integration token expire?+
It is not a short-lived user token, so it does not lapse after hours or days like one. It stops working if the client removes your app's access, if permissions are revoked or if the app loses the permission, so check it with debug_token and handle OAuth errors.
Why does my code exchange return an OAuth error?+
Usually because the code expired or was already used. Codes are single-use and live for about 30 seconds, so exchange each one immediately on your server and never retry with the same code.

See InfiQ pricing

Try it on the official WhatsApp Business API

InfiQ is an official Meta Business Partner. Start a 7-day free trial — no card needed — and see this running on your own number.