Arif Shareef
Arif Shareef

Reputation: 1

Autodesk Create or Get Asset in Project using 3 leg token AUTH-006

steps :

  1. Created app for Asset , Project, User i.e : https://aps.autodesk.com/hubs/@personal/applications/
  2. Getting code based on the key : https://aps.autodesk.com/en/docs/oauth/v2/reference/http/authorize-GET/ i.e : https://developer.api.autodesk.com/authentication/v2/authorize?response_type=code&client_id={clientid}&redirect_uri=http://localhost/&nonce=12321321&scope=bucket:create data:read data:create data:write account:read
  3. Clicking on Allow &Authorize the application in User interface
  4. Copy the code from the url after step3
  5. Invoking Post API : https://developer.api.autodesk.com/authentication/v2/token and passing Clientid & Client Secret In Authorization section and retrieveing the token
  6. GET https://developer.api.autodesk.com/construction/assets/v2/projects/{projectid}/assets with the given token specified in header section against Authorization and x-user-id Authorization Bearer AccessToken x-user-id userid 7 response for step6 is given below { "developerMessage": "Access token provided is invalid or expired.", "moreInfo": "https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/", "errorCode": "AUTH-006" } Invoking ACC Asset API with 3 leg token which is generated less than a minute and getting response is token is invalid or expired

Upvotes: 0

Views: 42

Answers (1)

Carol Gitonga
Carol Gitonga

Reputation: 97

It looks like you may have wrongly copy-pasted this token.

May you use this tool : https://jwt.io/ to verify your token.

I am able to reproduce this only when I intentionally miscopy the token

Upvotes: 0

Related Questions