1

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

aminography
  • 21,986
  • 13
  • 70
  • 74
Harish Kumar
  • 927
  • 3
  • 20
  • 46

1 Answers1

0

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/.

Christoph Petschnig
  • 4,047
  • 1
  • 37
  • 46
  • I tried this solution already but got same response in the callback url. even sometimes its not show me the login screen it just directly redirected to callback url. – Harish Kumar Nov 06 '19 at 13:44
  • Do you get the page with the flags? Can you double check you select the correct country for your user? – Christoph Petschnig Nov 06 '19 at 15:16
  • yes i have registered for the UK and while logging i select UK again. it redirect me to the callback url with those errors – Harish Kumar Nov 07 '19 at 05:07
  • There seems to be something wrong with your user account. As a workaround I suggest to register a new trial account with a different email address. The Sage team is investigating this issue, nonetheless. – Christoph Petschnig Nov 07 '19 at 08:05
  • I tried registering with google but its showing 404 error while login with that account. later tried with yahoo too but while signing up its redirecting me to https://www.sage.com/en-ca/sage-business-cloud/accounting/ – Harish Kumar Nov 07 '19 at 09:50
  • Any luck in the end? We're getting a mixture of this error for some accounts and then "error=temporarily_unavailable&error_description=The backend service is temporarily not available. Please try again later" but we've been getting that for 2 days... – El Xando Jul 23 '20 at 10:45
  • @ElXando Can you please post your issue at https://www.sagecity.com/developer/accounting-api/f/discussions? It gets much more visibility there from Sage side. Thank you – Christoph Petschnig Jul 24 '20 at 13:35