【问题标题】:Postman - How to Import Users to a BIM 360 Project Using the V2 EndpointPostman - 如何使用 V2 端点将用户导入 BIM 360 项目
【发布时间】:2020-01-07 12:49:44
【问题描述】:

我正在开发一个小型 .NET 控制台应用程序,该应用程序使用 BIM 360 API 使用双向身份验证方法来管理项目和帐户成员。我在尝试使用 hq/v2/accounts/:account_id/projects/:project_id/users/import 端点将用户导入 BIM 360 项目时遇到问题。

在 .NET 控制台应用程序和 Postman 中,我都会收到 404 状态代码,其中包含以下正文响应:

{
    "code": 1004,
    "message": "this user doesn't exist."
}

请求标头

Content-Type: "application/json";
x-user-id: "********-****-****-****-************";
Authorization: Bearer ****<two-legged token string>*****;

x-user-id 是分配给帐户管理员的 guid)

请求正文

{
  "user_id": "********-****-****-****-************",
  "services": {
    "project_administration": {
      "access_level": "admin"
    },
    "document_management": {
      "access_level": "admin"
    }
  },
  "company_id": "********-****-****-****-************",
  "industry_roles": []
}

在请求正文中,我使用了从 hq/v1/accounts/:account_id/users/:user_id id 属性中获取的 user_idemail。我使用了一个已经是项目成员的用户,一个在 Admin 目录中但不是项目成员的用户,以及一个两者都不是的全新用户。这三个仍然返回相同的错误。

我遇到过类似的问题herehere,但仍然无法解决问题。 还有什么我忽略的吗?提前感谢您的帮助。

【问题讨论】:

  • 我认为在欧特克的论坛上问这个问题可能会更好。
  • 您传递的user_id 的格式是什么?它应该是 o [A-Z][0-9] 的形式,而不是类似 GUID 的

标签: c# postman autodesk-forge autodesk-bim360


【解决方案1】:

负载的user_id 属性和x-user-id 标头需要是用户的uid,而不是用户的id

【讨论】:

    猜你喜欢
    • 2018-07-23
    • 2019-06-09
    • 2019-06-12
    • 2019-03-23
    • 2020-06-24
    • 2023-03-30
    • 1970-01-01
    • 2017-10-23
    • 2020-03-03
    相关资源
    最近更新 更多