Get a list of WhatsApp Business Accounts on a Business.
Requirements
whatsapp_business_management permission
whatsapp_business_messaging permission
public_profile permission
BUSINESS ID (also referred to as BUSINESS MANAGER ID in Business Settings)
ADMIN SYSTEM USER ACCESS TOKEN for the business
Request
curl -i -X GET \
'https://graph.facebook.com/LATEST-VERSION/BUSINESS-ID/client_whatsapp_business_accounts' \
-H 'Authorization: Bearer USER-ACCESS-TOKEN'
Response
{ "data": [ ] }
Request with Filtering
curl -i -X GET \
"https://graph.facebook.com/LATEST-VERSION/BUSINESS-ID/client_whatsapp_business_accounts \
?fields=id,name,ownership_type \
&filtering=[{'field':'ownership_type', 'operator': 'IN', 'value': ['SELF', 'CLIENT_OWNED']}]" \
-H 'Authorization: Bearer USER-ACCESS-TOKEN'
由此關係連線進行的閱讀將回傳 JSON 格式結果:
{ "
data
": [], "paging
": {} }
data
將在每個傳回的節點新增以下欄位:
欄位 | 說明 |
---|---|
permitted_tasks list<string> | Tasks that are assignable to users on this asset |
paging
錯誤 | 說明 |
---|---|
200 | Permissions error |
368 | The action attempted has been deemed abusive or is otherwise disallowed |
104 | Incorrect signature |
190 | Invalid OAuth 2.0 Access Token |
100 | Invalid parameter |
200008 | WhatsApp Business Account has no linked phone numbers. |