Represents a collection of WhatsApp Business Accounts owned by a business.
Get a list of WhatsApp Business Accounts owned by this business. Supports filtering and sorting.
Requirements
whatsapp_business_management permission
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/owned_whatsapp_business_accounts' \
-H 'Authorization: Bearer USER-ACCESS-TOKEN'
Response
{ "data": [ { "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "name": "Test WhatsApp Business Account", "timezone_id": "1", "message_template_namespace": "MESSAGE-TEMPLATE-NAMESPACE" } ], "paging": { "cursors": { "before": "BEFORE-CURSOR", "after": "AFTER-CURSOR" } } }
Request with Filtering
curl -i -X GET \
"https://graph.facebook.com/LATEST-VERSION/BUSINESS-ID/owned_whatsapp_business_accounts \
?fields=id,name,creation_time \
&filtering=[{'field':'creation_time', 'operator': 'IN_RANGE', 'value': ['1569783261', '1604542049']}]"
-H 'Authorization: Bearer USER-ACCESS-TOKEN'
从这条连线读取将返回一个 JSON 格式的结果:
{ "
data
": [], "paging
": {} }
data
paging
错误 | 描述 |
---|---|
200 | Permissions error |
190 | Invalid OAuth 2.0 Access Token |
368 | The action attempted has been deemed abusive or is otherwise disallowed |
104 | Incorrect signature |
80008 | There have been too many calls to this WhatsApp Business account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
100 | Invalid parameter |