After embedding the signup flow in your website, the next step is to integrate with the API endpoints needed to complete the process.
This guide specified over actions Solution Partner may need to perform to manage WhatsApp Business Accounts (WABAs).
After a business finishes the embedded signup flow, you can get the shared WABA ID using the returned accessToken
with the Debug Token endpoint. Include your System User access token in a request header prepended with Authorization: Bearer
for this API call.
GET https://graph.facebook.com/<API_VERSION>/debug_token ?input_token=<TOKEN_RETURNED_FROM_SIGNUP_FLOW>
curl \
'https://graph.facebook.com/v21.0
/debug_token?input_token=EAAFl...' \
-H 'Authorization: Bearer EAAJi...'
{ "data" : { "app_id" : "670843887433847", "application" : "JaspersMarket", "data_access_expires_at" : 1672092840, "expires_at" : 1665090000, "granular_scopes" : [ { "scope" : "whatsapp_business_management", "target_ids" : [ "102289599326934", // ID of newest WABA to grant app whatsapp_business_management "101569239400667" ] }, { "scope" : "whatsapp_business_messaging", "target_ids" : [ "102289599326934", "101569239400667" ] } ], "is_valid" : true, "scopes" : [ "whatsapp_business_management", "whatsapp_business_messaging", "public_profile" ], "type" : "USER", "user_id" : "10222270944537964" } }
Each object in the granular_scopes
array identifies the IDs of every WABA that has granted your app a given permission (scope
). IDs for the most recently onboarded WABAs appear first, so capture the first ID in the target_ids
array for the whatsapp_business_management
scope.
The client_whatsapp_business_accounts
endpoint retrieves a list of all the WABAS assigned to/shared with your Business Manager account once the embedded signup flow is completed.
You can use this endpoint periodically to track the WABAs shared with you. This way you can see the difference and find the ones that were shared with you recently, as a fallback to the Debug-Token endpoint approach described in the WhatsApp Business Account Management guide.
A list of the WABA fields that can be requested from this endpoint can be found in the WhatsApp Business Account reference.
GET https://graph.facebook.com/<API_VERSION>/<BUSINESS_MANAGER_ACCOUNT_ID>/client_whatsapp_business_accounts
curl \
'https://graph.facebook.com/v21.0
/805021500648488/client_whatsapp_business_accounts/' \
-H 'Authorization: Bearer EAAJi...'
{ "data": [ { "id": 1906385232743451, "name": "My WhatsApp Business Account", "currency": "USD", "timezone_id": "1", "message_template_namespace": "abcdefghijk_12lmnop" }, { "id": 1972385232742141, "name": "My Regional Account", "currency": "INR", "timezone_id": "5", "message_template_namespace": "12abcdefghijk_34lmnop" }, ], "paging": { "cursors": { "before": "abcdefghij", "after": "klmnopqr" } } }
A Solution Partner has the following permissions in a shared WABA:
On their side, the businesses onboarding via embedded signup can see and/or do:
Category | What can businesses see? |
---|---|
Insights | Messaging, cost, and quality state changes. |
Quality | Quality statuses and ratings. |
Category | What can businesses do? |
---|---|
Assets | Add and manage phone numbers and templates. Businesses cannot download the certificate for registering a phone number, only Solution Partners can do that. |
WABA management | Unshare WABA with a Solution Partner, delete WABA, and change settings. |
Integration with other Meta products | Integrate with Ads that Click to WhatsApp. |
Solution Partners cannot disable what businesses are able to see or do or customize their views.
Businesses can see Manage Your WhatsApp Solution Partner's Permissions for more information.
Solution Partners receive relevant notifications via webhooks and through Business Manager. Notifications are sent when:
If the business leaves the embedded signup flow before they have successfully completed it, they may have shared the WABA but the certificate will not yet be ready to download. If this happens, please reach out to the business to help them complete the embedded signup flow.
Use the owned_whatsapp_business_accounts
endpoint to get a list of the WABAs that your business owns. For the request, use your system user's access token.
GET https://graph.facebook.com/<API_VERSION>/<BUSINESS_MANAGER_ACCOUNT_ID>/owned_whatsapp_business_accounts
curl \
'https://graph.facebook.com/v21.0
/805021500648488/owned_whatsapp_business_accounts/' \
-H 'Authorization: Bearer EAAJi...'
{ "data": [ { "id": 1906385232743451, "name": "My WhatsApp Business Account", "currency": "USD", "timezone_id": "1", "message_template_namespace": "abcdefghijk_12lmnop" }, { "id": 1972385232742141, "name": "My Regional Account", "currency": "INR", "timezone_id": "5", "message_template_namespace": "12abcdefghijk_34lmnop" }, ], "paging": { "cursors": { "before": "abcdefghij", "after": "klmnopqr" } } }
You can filter client and owned WhatsApp business accounts based on their creation time. For the request, you can use the parameters listed below.
GET https://graph.facebook.com/<API_VERSION>/<BUSINESS_MANAGER_ACCOUNT_ID>/owned_whatsapp_business_accounts ?filtering=<FILTERING>
The filtering
value can be an array containing a single object comprised of the following properties:
Name | Description |
---|---|
| Contains the field being used for filtering. Set to |
| Contains how you want to filter the accounts. Supported values:
|
| A UNIX timestamp to be used in the filtering. |
[ { "field" : "creation_time", "operator" : "GREATER_THAN", "value" : "1604962813" } ]
curl \
'https://graph.facebook.com/v21.0
/805021500648488/owned_whatsapp_business_accounts' \
-H 'Authorization: Bearer EAAJi...' \
-H 'Content-Type: application/json' \
-d '[{"field":"creation_time","operator":"GREATER_THAN","value":"1604962813"}]'
{
"data": [
{
"id": “12312321312”,
"name": "test",
"currency": "USD",
"timezone_id": "1",
"message_template_namespace": "46fe_814"
}
],
"paging": {
"cursors": {
"before": "QVFIUm9",
"after": "QVFIUklX"
},
"next": "https://graph.facebook.com/v21.0
/“
}
}
You can sort shared and owned WhatsApp Business Accounts based on their creation time.
GET https://graph.facebook.com/<API_VERSION>/<BUSINESS_MANAGER_ACCOUNT_ID>/owned_whatsapp_business_accounts ?sort=<SORT>
The sort
value can be creation_time_ascending
or creation_time_descending
.
curl \
'https://graph.facebook.com/v21.0
/805021500648488/owned_whatsapp_business_accounts?sort=creation_time_ascending' \
-H 'Authorization: Bearer EAAJi...'
{ "data": [ { "id": 1906385232743451, "name": "My WhatsApp Business Account", "currency": "USD", "timezone_id": "1", "message_template_namespace": "abcdefghijk_12lmnop" }, { "id": 1972385232742141, "name": "My Regional Account", "currency": "INR", "timezone_id": "5", "message_template_namespace": "12abcdefghijk_34lmnop" }, ], "paging": { "cursors": { "before": "abcdefghij" "after": "klmnopqr" } } }
You can get a WhatsApp Business Account's review status by requesting the account_review_status
field.
GET https://graph.facebook.com/<API_VERSION>/<WABA_ID> ?fields=account_review_status
curl \
'https://graph.facebook.com/v21.0
/106526625562206?fields=account_review_status' \
-H 'Authorization: Bearer EAAJi...' \
{ "account_review_status": "APPROVED", "id": "1111111111111" }
The account_review_status
property can have one of the following values: PENDING
, APPROVED
, and REJECTED
.