Questo documento è stato aggiornato.
La traduzione in Italiano non è ancora completa.
Aggiornamento inglese: 17 dic
Aggiornamento Italiano: 22 feb

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}"
Per trovare l'ID di un account WhatsApp Business, accedi a Business Manager > Impostazioni business > Account > Account WhatsApp Business. Trova l'account che vuoi utilizzare e clicca su di esso. Si aprirà una scheda contenente le informazioni relative all'account, incluso l'ID.

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