I'm trying to list the projects by using the Account admin profile for this I've used below endpoint and used the Two-legged access token for my account ID. But It always has thrown error as 'Token does not have the privilege for this request. when trying to list the projects'
Asked
Active
Viewed 101 times
0
-
For this Endpoint, https://developer.api.autodesk.com/hq/v1/accounts/:account-id/projects?limit=1&offset=0&sort=name – Anand Jan 29 '20 at 08:35
-
What request are You tried? Did U already got working example ??? – SkorpEN Jan 29 '20 at 08:44
-
@SkorpEN, I have tried this Endpoint https://developer.api.autodesk.com/hq/v1/accounts/:account/projects?limit=1&offset=0&sort=name also I don't have any working examples. So could you please guide me to get the correct results – Anand Jan 29 '20 at 10:03
-
Did U searched work working example for autodesk api ?? Did You know what is hq and do you have any account there ??? – SkorpEN Jan 29 '20 at 10:12
-
did U tried https://stackoverflow.com/questions/39911487/getting-forge-2-legged-authentication-using-cross-request?rq=1 this solution ??? – SkorpEN Jan 29 '20 at 10:13
-
Yes, I got the Two-legged access token in OAuth process. But I got the error While I try to list the project by using the Two-legged access token and my account-id. – Anand Jan 29 '20 at 10:30
-
I don't know about the term of 'hq' Just I referred this in this URL (doc) - https://forge.autodesk.com/en/docs/bim360/v1/reference/http/projects-GET/ – Anand Jan 29 '20 at 10:32
-
Are U using Postman ? Could you generate curl from it ??? – SkorpEN Jan 29 '20 at 10:35
-
start with the simplest request to that api, just to know that you are authenticated correctly. – SkorpEN Jan 29 '20 at 10:36
-
Yes @SkorpEN, I have tried this in Postman. Here I can authenticate this Endpoint - https://developer.api.autodesk.com/authentication/v1/gettoken and generated the access token after that, I have tried this endpoint - https://developer.api.autodesk.com/hq/v1/accounts/:account/projects?limit=1&offset=0&sort=name by a newly generated access token. But it's not working – Anand Jan 29 '20 at 10:42
-
Did U know your accountsId ??? – SkorpEN Jan 29 '20 at 10:56
-
Yeah. I know my account-id. This is my sample call - https://developer.api.autodesk.com/hq/v1/accounts/e3d5ef8d-5c37-4b9d-925d-1e6d24753ace/projects?limit=1&offset=0&sort=name' – Anand Jan 29 '20 at 11:05
-
Could you export your request into curl format from postman ??? You could change token for privacy reason. – SkorpEN Jan 29 '20 at 11:07
-
response : { "developerMessage": "Token does not have the privilege for this request.", "moreInfo": "https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/", "errorCode": "AUTH-010" } – Anand Jan 29 '20 at 11:28
-
Now it's working for me. It's caused by scope variables. Thanks for your help – Anand Jan 29 '20 at 11:43