oauth2 authentication

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hi,
I want to get access token. For that I first make GET request
http://mystore/oauth/authorize?redirect_uri=http%3A%2F%2Fmystore/oauth-callback&client_id=<myclientid>&response_type=code

Then I get code from response uri and make next POST request
http://mystore/api/token
with headers:
["Content-Type":"application/x-www-form-urlencoded","Accept":"application/json"

and fields:
client_id, client_secret, code, grant_type= authorization_code, redirect_uri.
Finally, i get error response:

{
    "error": "unauthorized_client"
}
and if I repeat same request I will get another error:

{
    "error": "invalid_grant"
}


What is the problem?
4 years ago
oleksandr.lysun wrote:
Hi,
I want to get access token. For that I first make GET request
http://mystore/oauth/authorize?redirect_uri=http%3A%2F%2Fmystore/oauth-callback&client_id=<myclientid>&response_type=code

Then I get code from response uri and make next POST request
http://mystore/api/token
with headers:
["Content-Type":"application/x-www-form-urlencoded","Accept":"application/json"

and fields:
client_id, client_secret, code, grant_type= authorization_code, redirect_uri.
Finally, i get error response:

{
    "error": "unauthorized_client"
}
and if I repeat same request I will get another error:

{
    "error": "invalid_grant"
}


What is the problem?

Hello.
... have a look at this link...
https://developers.google.com/identity/protocols/OpenIDConnect#setredirecturi
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.