0
votes

According to the Forge API reference you use the Model Derivative API to extract data from a model file. I use the post job endpoint (https://developer.api.autodesk.com/modelderivative/v2/designdata/job). My application has the Model Derivative API added and I have retrieved a token with data:read and data:write. As input I have the URN of a model uploaded in an A360 Team project but the API reference states that the file needs to be uploaded to a bucket in the OSS. The response from the endpoint is status code Unauthorized.

I guess I need to upload the model into OSS. But isn't the model already uploaded into OSS by A360 Team, or do I need to do it manually before I post the job?

1

1 Answers

0
votes

Indeed OSS is the actual place where all Autodesk files are stored, but the token required to access the file depends on how it was stored.

If the file resides under an user account on A360, then you need a 3-legged token (which contains the user authorization). For this you'll need to implement a OAuth workflow. This github sample show the complete workflow (see it live here).

The 2-legged token is used to access application files (not stored/created by end-users).