1
votes

I am trying to add collaborators through Box API, but when I am adding a user group, the api request return status 403: Forbidden.

Here is the request attributes i'm passing:

{"item": { "id": "3907701373", "type": "folder"}, "accessible_by": {"id": "400235","type":"group"}, "role": "viewer"}

And it returns me this error:

Bearer realm="Service", error="insufficient_scope", error_description="The request requires higher privileges than provided by the access token."

1
Hi Nikko, did you see the follow-up I posted?John Hoerr
@JohnHoerr Thanks, also thought it has something to do with my user's access on the user group and folder that I am modifying. Thanks a lot!Nikko Reyes

1 Answers

2
votes

The documentation for Create Collaboration states that:

Errors may occur if the IDs are invalid or if the user does not have permissions to create a collaboration.

Are you able to create a collaboration with a regular user on that folder?

Follow-Up

I think the problem could be due to one, or possibly both, of the following:

  1. Box recently introduced the Group Admin, which has permissions to "add existing users to their groups, create new users that will be assigned to their groups, and assign folder access to their groups." You may need to have those permissions in order to manage group collaborations.

  2. Your may need to enable the Manage an Enterprise scope for your application, under OAuth2 Parameters > Scopes. If (1) above is true then your app most likely requires elevated, enterprise privileges.