0

我想为服务器设置 webhook。我遵循此说明(以及其他几个):https ://developer.autodesk.com/en/docs/webhooks/v1/tutorials/create-a-hook/

每次我得到同样的错误:Access denied for the scope urn:adsk.wipprod:fs.folder:co.cT9kz1IxRZy5rgSCupQ3vg that you are trying to create hook on

请检查电话:

curl -X 'POST'  -v 'https://developer.api.autodesk.com/webhooks/v1/systems/data/events/dm.version.added/hooks' -H 'Content-Type: application/json' -H 'authorization: Bearer '$1 -d '{
        "callbackUrl": "***",
        "scope": {
             "folder": "urn:adsk.wipprod:fs.folder:co.cT9kz1IxRZy5rgSCupQ3vg"
        },
        "hookAttribute": {
          "projectId": "***"
        }

  }'

*** - 被隐藏。

调用结构类似于文档中的示例。文件夹存在。我很高兴收到任何想法。

4

1 回答 1

0

From the description, I believe this can be one of 2 possible issues:

  1. the 3-legged token you're using don't have access to this folder. Note the Webhook is created and stored per user per app, so the user (Autodesk Account that is logged in) need to have access to this folder.

  2. the access token is missing the data:read data:write scopes required for webhooks.

Can you check this and share the results? Maybe add more details on your 3-legged and make sure the user can see the folder (e.g. list files on it with the access token).

于 2018-03-15T14:23:57.380 回答