Harish Kumar
Harish Kumar

Reputation: 995

Getting error "email already in use" while requesting for authorization code in sageone API

I am trying to get access token for granting my sageone api request but before that I need to get the authorization code. But when I am trying to get one I got an error on my callback url that "email is already in use" here is the request url

 `https://www.sageone.com/oauth2/auth/central?filter=apiv3.1&client_id={{MY_CLIENT_ID}}&response_type=code&redirect_uri=http://localhost:85/test.php&scope=full_access&state=1234`

After visit above link I prompted to login to my sage account when I logged in then I redirected to the callback url which I provided in the above request and got below errors in parameters

http://localhost:85/test.php?error=Invalid+request&reason=Email+already+in+use&state=1234

any can body can suggest anything here

Upvotes: 1

Views: 491

Answers (1)

Christoph Petschnig
Christoph Petschnig

Reputation: 4157

Email already in use usually happens in a situation, where you have logged into the Sage One/Accounting application in the browser for a different country in the past. There is a valid cookie for the user, but the application looks for the user in the wrong country.

Use this URL to reset the cookie: https://www.sageone.com/?clear. Call it before you go to https://www.sageone.com/oauth2/auth/central and this should be fixed.

Note: for more documentation about this behaviour, check out the FAQs: https://developer.sage.com/api/accounting/guides/faq/.

Upvotes: 0

Related Questions