Reputation: 9
I am trying to get my forge app access token using a manual trigger in Power Automate. I keep receiving an error saying The client credentials are invalid. I use " https://developer.api.autodesk.com/authentication/v2/token " endpoint for this, and this is my body in the HTTP post
client_id=OJP5THOTP8tGNOdEzc3aZfSM********&client_secret=yWINmvxvvX13****&grant_type=client_credentials&scope=data:read%20data:write
Upvotes: 0
Views: 114
Reputation: 2054
To use OAuth2 V2, your request body of https://developer.api.autodesk.com/authentication/v2/token is not correct. The body you specified is still the old V1.
Check the link https://aps.autodesk.com/en/docs/oauth/v2/tutorials/get-2-legged-token/ for the usage,
Here is one example:
curl -v 'https://developer.api.autodesk.com/authentication/v2/token' \
-X 'POST' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-H 'Authorization: Basic <BASE64_ENCODED_STRING_FROM_STEP_1>' \
-d 'grant_type=client_credentials' \
-d 'scope=data:read'
Upvotes: 0