1

Having trouble getting an initial Access Token for Forge, It looks like I'm following the tutorial to a T, but no luck.

https://developer.autodesk.com/en/docs/oauth/v2/reference/http/authenticate-POST/

I'm running curl on windows via Cygwin.

curl -v 'https://developer.api.autodesk.com/authentication/v1/authenticate' -X 'POST' -H 'Content_Type: application/x-www-form-urlencoded' -d 'client_id=000000000000000000000000000000000&client_secret=0000000000000000&grant_type=client_credentials&scope=data:read'

What I get back is...

< HTTP/1.1 400 Bad Request
< Content-Type: application/json
< Date: Mon, 13 Mar 2017 03:50:00 GMT
* Server Apigee Router is not blacklisted
< Server: Apigee Router
< Content-Length: 210
< Connection: keep-alive
<
* STATE: PERFORM => DONE handle 0x600057680; line 1981 (connection #0)
* multi_done
* Curl_http_done: called premature == 0
* Connection #0 to host developer.api.autodesk.com left intact
{"developerMessage":"Requested scopes must be blank or a subset of the provided scopes.","userMessage":"","errorCode":"AUTH-004","more info":"http://developer.api.autodesk.com/documentation/v1/errors/AUTH-004"}

Not sure what's going on. Is my requested scope actually wrong?

2 Answers 2

1

JQ will certainly make things more pleasant moving forward.

It turns out my problem was the encoding of the shell script I was writing the command into was dos. Setting it to Unix allowed my args to be interpreted correctly.

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

Comments

0

You can check the steps I have setup in this post which also gets a 2legged authentication token through cURL. I have tested both scenarios with OSX terminal and Windows Cygwin.

https://forge.autodesk.com/blog/tutorial-using-curl-2-legged-authentication-model-translation

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.