Danny Bentley
Danny Bentley

Reputation: 53

Autodesk Forge get access token

Can some help me understand what I've typed incorrectly to create a read & write token. I have types zeros in my client id and client secret for my security so I know that isn't the problem. If you can show me a clear example that would be helpful. I've been stuck for a while. Autodesk sample only has a read example.

curl -v 'https://developer.api.autodesk.com/authentication/v1/authenticate' 
-X 'POST' 
-H 'Content-Type: application/x-www-form-urlencoded' 
-d 'client_id=00000000000000000000000000000000&
client_secret=0000000000000000&
grant_type=client_credentials&
scope=data:read, data:write, bucket:create, bucket:read'

Upvotes: 2

Views: 1018

Answers (1)

cyrille
cyrille

Reputation: 2659

You need to replace ', ' by '%20'. This is because you say the data is x-www-form-urlencoded.

curl -v 'https://developer.api.autodesk.com/authentication/v1/authenticate' -X 'POST' -H 'Content-Type: application/x-www-form-urlencoded' -d 'client_id=00000000000000000000000000000000& client_secret=0000000000000000& grant_type=client_credentials& scope=data:read%20data:write%20bucket:create%20bucket:read'

Upvotes: 3

Related Questions