Rich-text Reply

Troubles with Oauth2 Authorization code grant

Sandy 02-15-16

Troubles with Oauth2 Authorization code grant

Hi everyone,


I have problems with Oauth2 setup. I'm experimenting on my local machine. When I click a link to authorize my application I get such error: Error: Invalid authorization request

And authorization url is:


However if I change response_type from 'code' to 'token' everything works fine. What am I missing?





Level 1

DavidS 02-16-16

Re: Troubles with Oauth2 Authorization code grant

Hi Sandy,


Thanks for reaching out!


This error is most likely due to the fact that you are using an HTTP redirect URI. If you are using an authorization code grant, insecure URLs such as those starting with http:// will be rejected.

You can find out more about it by taking a look at the Authorization parameters in the REST API reference page.


With the response_type set to code, the redirect URI must be an HTTPS URI. To fix the issue, you need to change the redirect URI to an HTTPS one. You can change the redirect URI by following this link


Let me know if that fixes the issue!