In reply to Edo.

Hi Edo - don't forget that the example for the auth code flow is all pseudo code to generalize for your platform/framework/language of choice, but it sounds like your programmatic call to /SASLogon/oauth/authorize might not have the proper redirect_uri URL parameter value in it. As long as the "redirect_uri" in the client registration and in your authorize request are the same, this will work.