框 Api : 添加用户组作为协作者 return 403 禁止访问

Box Api : Adding User Group as Collaborator return 403 Forbidden

我正在尝试通过 Box API 添加协作者,但是当我添加用户组时,api 请求 return 状态 403:禁止。

这是我传递的请求属性:

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

它 return 给我这个错误:

承载域="Service",错误="insufficient_scope",error_description="The request requires higher privileges than provided by the access token."

Create Collaboration 的文档指出:

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

您能否在该文件夹上创建与普通用户的协作?

跟进

我认为问题可能是由于以下一种或两种原因造成的:

  1. Box 最近推出了 Group Admin,它有权“将现有用户添加到他们的组,创建将分配给他们的组的新用户,并分配对其群组的文件夹访问权限。" 您可能需要拥有这些权限才能管理群组协作。

  2. 您可能需要为您的应用程序启用 管理企业 范围,在 OAuth2 参数 > Scopes. 如果以上 (1) 为真,那么您的应用很可能需要提升的企业权限。