文件夹权限批量更新端点返回“访问被拒绝”错误

问题描述

我正在尝试使用文件夹权限批量更新端点 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 是解决方案。当我删除它时,请求有效。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...