【问题标题】:Autodesk Forge accessing b360 hub to get projects - error 404Autodesk Forge 访问 b360 hub 以获取项目 - 错误 404
【发布时间】:2021-01-08 18:22:32
【问题描述】:

我正在尝试使用本指南发布项目 - https://forge.autodesk.com/en/docs/data/v2/tutorials/publish-model/

我能够获取预期中心的文档中心 ID(使用 3 legged 令牌,在 Autodesk 配置 b360 文档帐户并设置与 forge 应用程序的集成后),并将其传递给调用以获取使用本指南的项目(使用相同令牌或新令牌) - https://forge.autodesk.com/en/docs/data/v2/reference/http/hubs-hub_id-projects-GET/

我使用 GET hubs 调用中提供的以 b.xxx 开头的集线器 ID 从 GET 集线器返回响应 404 错误

{
"developerMessage": "The requested resource does not exist.",
"moreInfo": "https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/",
"errorCode": ""
}

我已经尝试过这个。同样,而不是 b。并且没有运气的集线器ID前缀。我已验证此 ID 与在线帐户管理设置中显示的内容相匹配。

get 请求如下所示,其中包含格式为 Bearer {{token}} 的授权令牌,其中 {{token}} 是获取集线器 ID 时有效的令牌的(相同)变量。

https://developer.api.autodesk.com/project/v1/hubs/b.e3a26052-6b48-4a03-9115-xxxxxxxxxxx/projects

是我的格式不正确,还是有其他问题?

【问题讨论】:

    标签: autodesk-forge autodesk-data-management autodesk-bim360


    【解决方案1】:

    请求看起来不错,包括。集线器 ID(必须有 b. 前缀)。要检查的一件事是,您用于获取 3-legged 令牌的实际用户是否有权访问此中心内的任何项目。

    另外,当您尝试GET hubs/:hub_id 端点时会发生什么?你能看到集线器信息还是你也得到404?

    【讨论】:

    • 我确实在这个中心列出了项目。当我尝试使用与上述相同 ID 的 GET hubs/:hub id 时,我收到 403 错误。 {“jsonapi”:{“版本”:“1.0”},“错误”:[{“id”:“941d6027-cfcc-493e-xxxx-xxxxxxxxxxxx”,“状态”:“403”,“代码”:“ BIM360DM_ERROR", "detail": "未能获得 id b.e3a26052-6b48-4a03-xxxx-xxxxxxxxxxx 的集线器" } ] }
    • 根据文档,403错误代码表示:The request was successfully validated but permission is not granted or the application has not been white-listed. Do not try again unless you solve permissions first.。因此,这看起来确实是权限问题,无论是 Forge 应用本身,还是您尝试用于访问中心及其项目的用户帐户。
    猜你喜欢
    • 2016-12-20
    • 2020-09-30
    • 2021-10-09
    • 2017-12-15
    • 2021-10-24
    • 2023-03-12
    • 2018-01-21
    • 2018-08-10
    • 2021-12-01
    相关资源
    最近更新 更多