问题描述
我正在尝试使用文件夹权限批量更新端点
https://developer.api.autodesk.com/bim360/docs/v1/projects/:project_id/folders/:folder_id/permissions:batch-update
通过传入这样的主体来更新角色的权限:
[
{
"subjectId": "<role id>","subjectType": "ROLE","actions": [
"PUBLISH","EDIT","CONTROL","VIEW","DOWNLOAD","COLLABORATE"
]
}
]
我得到的回应是
{
"code": "ERR_AUTHORIZATION_ERROR","title": "The access is denied","detail": "The access is denied on resource <my project id>"
}
我正在使用两步验证并在 x-user-id
标头中传递帐户管理员用户的 ID。
解决方法
所以似乎不设置 x-user-id
是解决方案。当我删除它时,请求有效。