1

So I wanted to download a file inside a project. And I went through the following steps for the same -

  1. Created a web application on APS console.
  2. Generated authtoken using clientId & clientSecret.
  3. Generated authorization code by redirecting User on web and getting its consent for using 'Data:read' API.
  4. Successfully generated 3-legged token using Basic auth token generated in step-2 and the authorization code generated in step 3.
  5. Using Get Hubs api as mentioned in documentation but getting 'You don't have permission to access this API' error.

I'm attaching the JWT details of the token(step-4) that I've generated. jwt

{
  "scope": [
    "data:read"
  ],
  "client_id": "___MY_CLIENT_ID_WAS_HERE___",
  "iss": "https://developer.api.autodesk.com",
  "aud": "https://autodesk.com",
  "jti": "___HIDDEN___",
  "exp": 1730795145,
  "userid": "3L5JHG3YLRVJ6AFN"
}

(Please note that above are the decoded JWT token details from jwt.io)

The final response -

{
    "jsonapi": {
        "version": "1.0"
    },
    "links": {
        "self": {
            "href": "https://developer.api.autodesk.com/project/v1/hubs"
        }
    },
    "data": [],
    "meta": {
        "warnings": [
            {
                "Id": null,
                "HttpStatusCode": "**403**",
                "ErrorCode": "BIM360DM_ERROR",
                "Title": "Unable to get hubs from BIM360DM US.",
                "Detail": "**You don't have permission to access this API**",
                "AboutLink": null,
                "Source": null,
                "meta": null
            },
            ...
}

Requesting help. I have all the account accesses but not sure what more needs to be done here.

I also tried using 2-legged token instead of 3-legged. But the result was same. I've followed the documentation from here -

  1. https://aps.autodesk.com/en/docs/data/v2/tutorials/download-file/
  2. https://aps.autodesk.com/en/docs/oauth/v2/tutorials/get-3-legged-token/

1 Answer 1

1

Kindly make sure you are atleast a member of a project in the hub. Also make sure your app was added in the custom integrations as below

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.