0

I want to setup webhook to the server. I am guided by this instruction (and several other): https://developer.autodesk.com/en/docs/webhooks/v1/tutorials/create-a-hook/

Every time I get the same error: Access denied for the scope urn:adsk.wipprod:fs.folder:co.cT9kz1IxRZy5rgSCupQ3vg that you are trying to create hook on

Please check the call:

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": "***"
        }

  }'

*** - was hidden.

Call structure is similar to example in documentation. Folder exist. I will be glad receive any ideas.

Jadranko
  • 13
  • 4

1 Answers1

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).

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44