Jump to content

Topic on Project:Support desk

How to get access code token from oauth2/access_token?

1
Creamycd (talkcontribs)

I'm now developing an application which needs an auth code from the Extension:OAuth. I have already got a code from oauth2/authorize, so according to the docs, I need to send a POST request to oauth2/access_token.

So the url I posted was oauth2/access_token, andwith all the parameters in the body:

{'grant_type': 'authorization_code', 'code': code, 'client_id': consumerKey, 'redirect_uri': redirectUri, 'code_verifier': codeVerifier, 'code_challenge_method': 'S256'}.

But it keeps mentioning me:

{"error":"invalid_request","error_description":"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.","hint":"Check the `grant_type` parameter","message":"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."}

I don't know whether or not this is something with the cookies (just like the login part) or something else. But firstly I put them in the query string, but with the same result...

Thanks!

Reply to "How to get access code token from oauth2/access_token?"