oauth-2.0exact-online

Error 'Invalid authorization request' on preauthenticating Exact Online


Using cloud.invantive.com I am preauthenticating a connection to Exact Online using the OAuth2 Code Grant Flow. I have entered the client ID, the associated client secret and checked deviating redirect URI.

On clicking the Preauthenticate button, I get the following error without entering a username/password first:

Invalid authorization request

Invalid authorization request error on Exact Online

The URL on top is like:

https://start.exactonline.nl/api/oauth2/auth?response_type=code&client_id=4...stuff...b&redirect_uri=https%3A%2F%2Fcloud.invantive.com%2FUtilities%2FSettings&state=d...stuff...8


Solution

  • The error text does not give a clear hint, but in this case I had forgotten to replace the contents of the redirect URI by the value of the redirect URI given on the Exact Online app center on the app with the client ID used.

    After correcting the redirect URI, I was presented with a login form. After entering credentials I got my refresh token.