تم تحديث هذا المستند.
لم تكتمل الترجمة إلى اللغة ‏العربية‏ حتى الآن.
تاريخ تحديث المصدر باللغة الإنجليزية: ‏١٧ ديسمبر
تاريخ تحديث اللغة ‏العربية‏: ‏١١ يناير

Manage System Users

Adding your System User to shared WhatsApp Business Accounts allows you to programmatically manage the accounts. On this guide, we go over actions BSPs may need to perform to manage their system users.

Retrieve System User IDs

You can cache the System User IDs for future use.

Request

curl -i -X GET "https://graph.facebook.com/v21.0/{business-id}/system_users
  ?access_token={system-user-access-token}"
To find the ID of a business, go to Business Manager > Business Settings > Business Info. There, you will see information about the business, including the ID.

Response

{
  "data": [
    {
      "id": "1972555232742222",
      "name": "My System User",
      "role": "EMPLOYEE"
    }
  ]
}

Add System Users to a WhatsApp Business Account

For this API call, you need to use the access token of a System User with admin permissions.

Request

In the following example, use the ID for the assigned WABA.

curl -i -X POST "https://graph.facebook.com/v21.0/{waba-id}/assigned_users
  ?user={assigned-user-id}
  &tasks=['{your-permissions or tasks}']
  &access_token={admin-system-user-access-token}"
للبحث عن معرف حساب واتساب للأعمال، انتقل إلى مدير الأعمال > إعدادات مدير الأعمال > الحسابات > حسابات واتساب للأعمال. ابحث عن الحساب الذي تريد استخدامه وانقر عليه. ستفتح لوحة تحكم تحتوي على معلومات حول الحساب، بما في ذلك المعرف.

For the assigned-user-id, use the system user ID returned from your /{business-id}/system_users call.

Permissions

NameDescription

MANAGE**

Provides admin access.
Users can have admin access on a WhatsApp Business Account that is shared with Admin permissions.

DEVELOP

Provides developer access.
Users can have developer access on a WhatsApp Business Account that is shared with Standard permissions.

**Note: If you are trying to add a user to a WhatsApp Business Account that is shared with you via a Multi-Partner Solution you would have to use MANAGE_USERS to add the user to that account.

Response

{
  "success": true
}

Retrieve assigned users

You can fetch the assigned users of the WhatsApp Business Account to verify that the user was added. This is not a required step but helps with validation.

Request

In the following example, use the ID for the assigned WABA.

curl -i -X GET "https://graph.facebook.com/v21.0/{waba-id}/assigned_users
  ?business={business-id}
  &access_token={system-user-access-token}"

Response

{
  "data": [
    {
      "id": "1972385232742142",
      "name": "Anna Flex",
      "tasks": [
        "MANAGE"
      ]
    },
    {
      "id": "1972385232752545",
      "name": "Jasper Brown",
      "tasks": [
        "DEVELOP"
      ]
    }
  ]
}

See Also