Skip to main content

Just to give some context, I’m not a developer, but I have worked with other APIs before, including OAuth 2.0.

I’ve tried to pass the client_secret, code, and redirect_uri as query params, the client_id, and client_secret as body params, and the accept and content-type headers with application/json and application/x-www-form-urlencoded, respectively.

I've also tried to do everything as body params using application/json in the content-type header and a few slight variations.
Nothing seems to work! I always receive the following message:
status: 401
code: tokenNotProvided
message: No authorization data was found on the request
type: error
By the way, I’m using Make to make the request.

Is it me or the https://developers.miro.com/reference/ne-exchange-authorization-code-with-access-token could be improved?

Hi ​@Brenno Vicario Nicolau 

I’ve just tried this cURL request and it worked fine. Could you please try again with cURL instead? 

curl -X POST https://api.miro.com/v1/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id={your-client-id}" \
-d "client_secret={your-client-secret}" \
-d "code={your-code}" \
-d "redirect_uri=https://developers.miro.com/docs/" \
-d "grant_type=authorization_code"

 


This video may help as well. You could also try our Node OAuth app example too if you want an example implementation. 


Thanks, ​@Horea Porutiu! It worked perfectly.


Reply