【问题标题】:Unable to create webhook for Autodesk BIM 360 docs project无法为 Autodesk BIM 360 docs 项目创建 webhook
【发布时间】:2018-11-23 05:07:42
【问题描述】:

我正在尝试为 Autodesk BIM 360 项目创建一个 webhook,并以此错误结束 - “您尝试创建挂钩的范围被拒绝访问”。我正在使用 Postman 来测试 webhook 创建 - 这是我得到的响应 -

    {
    "hooks": [],
    "errors": [
        {
            "id": "071ec72d-20b5-40c1-9451-ee9cdf573984",
            "status": 403,
            "code": "FORBIDDEN_ERROR",
            "detail": [
                "Access denied for the scope <projectId> that you are trying to create hook on"
            ],
            "source": {
                "sysType": "adsk.wipprod",
                "eventType": "fs.file.added",
                "callbackUrl": "http://6bd04cad.ngrok.io/webhooks/bim360",
                "scope": {
                    "folder": "<projectId>"
                },
                "hookAttribute": null
            }
        }
    ]
}

【问题讨论】:

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


    【解决方案1】:

    您传递的范围是什么,您是否按照本教程进行操作?您的密钥是否已激活试用版?

    https://developer.autodesk.com/en/docs/webhooks/v1/tutorials/create-a-hook-data-management/

    【讨论】:

    • 我正在使用“数据:读取数据:写入”范围,并且还引用了相同的 API 文档,但不确定是否为密钥激活了试用版。您能指导我们试用激活吗?
    • 我认为您的作用域中缺少“数据:创建”。这是一个关于如何激活您的试用版的链接learnforge.autodesk.io/#/account/?id=activate-subscription
    • 我也尝试过使用“data:read data:write data:create”这三个范围,但没有成功。
    • 列出您的步骤,您是否按照我建议的教程进行操作
    • 啊,等等,您是否有权访问您尝试创建挂钩的项目?你有什么样的权限?
    【解决方案2】:

    我遇到了这个问题,因为旧的伪造应用程序没有配置 Webhook。现在我已启用它并且它已修复。

    现在我面临一个与拒绝访问有关的不同问题。这是细节 -

    使用 Autodesk forge 自定义集成为 BIM 360 文档创建 Webhook。我正在关注此 Webhook API 文档 https://developer.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-POST/,并且不断收到此响应。

    {
        “id”: “888134c7-fd22-4676-b907-d8441477dde4",
        “status”: 403,
        “code”: “FORBIDDEN_ERROR”,
        “detail”: [
            “Access denied for the scope b.2210c698-4e4b-47d0-b579-f92a969ef365 that you are trying to create hook on”
        ]
    }
    

    【讨论】:

      【解决方案3】:

      从你的问题看,你使用的是projectIdhubId,请确保使用folderId作为scope,它应该类似于urn:adsk.wipprod:fs.folder:abcd1234

      【讨论】:

      • 感谢@augusto-goncalves,我使用 folderId 作为范围。
      猜你喜欢
      • 2020-03-03
      • 2020-06-24
      • 2020-12-14
      • 2019-05-27
      • 2022-12-15
      • 2020-05-06
      • 2020-08-08
      • 2018-06-17
      • 2020-12-29
      相关资源
      最近更新 更多