Forge: Occasional 403 when trying to GetPublishJob

138 views Asked by At

We are occasionally seeing an issue with some projects where, when we try to do a GetPublishJob on a BIM360 model, we get back a 403 error, like this:

{"jsonapi":{"version":"1.0"},"errors":[{"id":"ad23cbc6-dc82-4dfd-83f9-6acd14bac6d2","status":"403","code":"C4R","detail":"Failed to get publish model job"}]} 

In the docs, it says it could be whitelisting or permissions. We know our app is whitelisted, because we would not have made it this far if it wasn't. We're using 3-legged OAuth, and we believe that the user is able to manually perform the Publish. Can you tell us what specific other permissions might need to be investigated?

1

There are 1 answers

3
Xiaodong Liang On

I am not typing answer, while I want to check some information with you:

if what you are using is this endpoint, it is public, so it does not need whitelisted. https://forge.autodesk.com/en/docs/data/v2/reference/http/GetPublishModelJob/ .

Since you are using 3 legged token, I doubt it may due to the expired token, while normally it should be 401 error.

With the same token, can your code perform Publish Model? https://forge.autodesk.com/en/docs/data/v2/reference/http/PublishModel/

was this workflow working well in the past? or just failed recently?

To use this endpoint, the logged user (for 3 legged token) should have access with the folder.