Returns the WhatsApp Business Account's assigned users.
Requirements
whatsapp_business_management permission
whatsapp_business_messaging permission
public_profile permission
BUSINESS ID (also referred to as BUSINESS MANAGER ID in Business Settings)
WhatsApp Business Account (WABA) ID
USER ACCESS TOKEN
Request
curl -i -X GET \
"https://graph.facebook.com/LATEST-VERSION/WHATSAPP-BUSINESS-ACCOUNT-ID/assigned_users?
business=BUSINESS-ID&
access_token=USER-ACCESS-TOKEN"
Response
{ "data": [ { "id": "ASSIGNED-USER-ID", "name": " ", "tasks": [ "MANAGE" ] } ], "paging": { "cursors": { "before": "BEFORE-CURSOR", "after": "AFTER-CURSOR" } } }
参数 | 描述 |
---|---|
business numeric string | business 必填 |
从这条连线读取将返回一个 JSON 格式的结果:
{ "
data
": [], "paging
": {}, "summary
": {} }
paging
summary
关于连线的汇总信息(例如次数总计)。请指定字段来调取概要中的参数(例如:概要=total_count
)。
字段 | 说明 |
---|---|
total_count unsigned int32 | Total count |
错误 | 描述 |
---|---|
100 | Invalid parameter |
200 | Permissions error |
190 | Invalid OAuth 2.0 Access Token |
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. |
/{whats_app_business_account_id}/assigned_users
发出 POST 请求,以更新 a WhatsAppBusinessAccount 。参数 | 描述 |
---|---|
tasks array<enum {MANAGE, DEVELOP, MANAGE_TEMPLATES, MANAGE_PHONE, VIEW_COST, MANAGE_EXTENSIONS, VIEW_PHONE_ASSETS, MANAGE_PHONE_ASSETS, VIEW_TEMPLATES, MESSAGING}> | Permissions on WhatsApp Business Account 必填 |
user UID | Business user ID 必填 |
success
: bool, 错误 | 描述 |
---|---|
100 | Invalid parameter |
200 | Permissions error |
/{whats_app_business_account_id}/assigned_users
发出 DELETE 请求,将 a WhatsAppBusinessAccount 与 a WhatsAppBusinessAccount 取消关联。参数 | 描述 |
---|---|
user UID | Business user ID 必填 |
success
: bool, 错误 | 描述 |
---|---|
100 | Invalid parameter |