0

I am trying to create a webhook for Autodesk BIM 360 project and ended with this error - "Access denied for the scope that you are trying to create hook on". I am using Postman to test the webhook creation - Here is the response which I am getting -

    {
    "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
            }
        }
    ]
}
sushilprj
  • 2,203
  • 1
  • 14
  • 19

3 Answers3

1

What are the scopes you are passing on, did you follow this tutorial? Has the trial been activated for your keys?

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

halfer
  • 19,824
  • 17
  • 99
  • 186
Jaime Rosales
  • 1,106
  • 1
  • 6
  • 8
  • I am using "data:read data:write" scopes and also referring the same API docs but not sure trial is activated for the keys. Could you please guide us the trial activation? – sushilprj Jun 14 '18 at 08:22
  • I think you are missing "data:create" in your scopes. and here is a link on how to activate your trial http://learnforge.autodesk.io/#/account/?id=activate-subscription – Jaime Rosales Jun 14 '18 at 08:43
  • I have also tried with "data:read data:write data:create" these three scopes but didn't succeed. – sushilprj Jun 14 '18 at 08:49
  • List me your steps, did you follow the tutorial I suggested – Jaime Rosales Jun 14 '18 at 08:51
  • ah wait, do you have access to the project you are trying to create the hook on? and what kind of permissions do you have on it? – Jaime Rosales Jun 14 '18 at 08:52
  • I haven't created this forge app, so I need to connect with concern person and ask about trial activation. You know the concern person Chidam from DPR construction. – sushilprj Jun 14 '18 at 09:02
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/173122/discussion-between-jaime-rosales-and-sushilprj). – Jaime Rosales Jun 14 '18 at 09:08
0

I was facing this issue due to having old forge application which didn't configure the Webhook. Now I have enabled it and it's fixed.

Now I am facing a different issue which is related to access denied. Here is the detail -

creating a Webhook for BIM 360 docs using Autodesk forge custom integration. I am following this Webhook API documentation https://developer.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-POST/ and am constantly getting this response.

{
    “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”
    ]
}
sushilprj
  • 2,203
  • 1
  • 14
  • 19
0

From your question, it seems that you used the projectId or hubId, make sure to use folderId as the scope, it should be similar to urn:adsk.wipprod:fs.folder:abcd1234

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