Asset Groups And Users

Manage your business' asset groups and learn how to connect your business users to asset groups.

Asset Groups

Get List of Groups

To get a list of asset groups associated with a business:

curl -i -X GET \
 "https://graph.facebook.com/<VERSION>/<BUSINESS_ID>/business_asset_groups?access_token=<ACCESS_TOKEN>"

The response looks like this:

{
  "data": [
    {
      "id": "<ID>",
      "name": "Northern Region"
    },
    {
      "id": "<ID>",
      "name": "Western Region"
    }
  ],
....
}

Get Specific Group

To read a specific business asset group:

curl -i -X GET \
 "https://graph.facebook.com/<API_VERSION>/<bus_asset_group_ID>?access_token=<TOKEN>"

The result includes the ID for the asset group:

{
 "id": "<ID>", "name": "A Name"
}

Rename Group

To rename a specific asset group:

curl -i -X POST \
 "https://graph.facebook.com/<VERSION>/<bus_asset_group_ID>?name=<NAME>&access_token=<TOKEN>"

On success, we return true.

Delete Group

To delete a specific asset group:

curl -i -X DELETE \
 "https://graph.facebook.com/<VERSION>/<asset_group_ID>?access_token=<TOKEN>"

We return true on success.

Users

Get User Access To Groups

View all business asset groups that a business-scoped user can access. For example:

curl -i -X GET \
 "https://graph.facebook.com/<VERSION>/<BUSINESS_SCOPED_USER_ID>/assigned_business_asset_groups?limit=1&access_token=<TOKEN>"

The response includes roles which define the access levels a user has per asset type:

{
  "data": [
    {
      "id": "<ID>" 
      "name": "A Name",      
      "page_roles": [ "ANALYZE", "ADVERTISE" ],
        "offline_conversion_data_set_roles": ["UPLOAD"],      "adaccount_roles": ["ANALYZE", "ADVERTISE"],      
        "pixel_roles": ["ANALYZE", "EDIT"]    
    }  
    ],
        ....
}

Get, Add, and Delete User Permissions

You can get, add and delete user permissions for a business asset group. To read a list of assigned users for the asset group:

curl -i -X GET \
 "https://graph.facebook.com/<VERSION>/<BUSINESS_ASSET_GROUP_ID>/assigned_users?limit=2&business=<BUSINESS_ID>&access_token=<TOKEN>"

The result looks like this:

{
  "data": [
    {
      "id": "<ID>",
      "name": "Dabney Donigan",
      "page_roles": [ "ANALYZE" ],  
      "offline_conversion_data_set_roles": [ "ADVERTISE", "UPLOAD", "MANAGE" ],
      "adaccount_roles": [ "ANALYZE" ],
      "pixel_roles": [ "ANALYZE", "EDIT" ]
      }
      ],
   ....
}

Assign User To Asset Group

You can assign users to a business asset group via this POST request to /assigned_users:

curl -i -X POST \
 "https://graph.facebook.com/<VERSION>/<BUSINESS_ASSET_GROUP_ID>/assigned_users?business=<BUS_ID>&user=<USER_ID>&page_roles=<P_ROLES>&adaccount_roles=<ROLES>&pixel_roles=<PIX_ROLES>&offline_conversion_data_set_roles=<OFF_ROLES>&access_token=<TOKEN>"

On success, we return true.

Remove User From Asset Group

To remove a user from a group:

curl -i -X DELETE \
 "https://graph.facebook.com/<VERSION>/<BUSINESS_ASSET_GROUP_ID>/assigned_users?business=&user=<USER_ID>&access_token=<TOKEN>"

We return true on success.