So I created a new Connected App in Salesforce - in a sandbox environment. In the app's settings I enabled OAuth with Full access and set the Callback URI to https://test.mydomain.com/tools/account_history.php

This was about a week ago, so I know that the Callback URI has had plenty of time to fully propagate. However, if I try loading the auth URL it returns this error every time:


These are the auth URLs I have been trying:





Is there perhaps an entirely different auth URL to use for sandboxed environments? The error seems misleading since the URI I'm sending in my auth request does precisely match my configuration.


If your sandbox has My Domain enabled, replace test.salesforce.com with your domain and try again.

  • Thank you, I didn't even know about My Domain! It was enabled although Prevent login from https://test.salesforce.com was unchecked. At any rate, I just tried using the My Domain setting https://mydomain--Full.cs47.my.salesforce.com but receive the same result. I thought for sure this was the issue. I'll keep trying.
    – Typel
    Sep 25 '19 at 19:30
  • which OAuth flow are you trying to use? I noticed you are not passing the client secret. Sep 25 '19 at 19:55
  • Authorization Code Grant: tools.ietf.org/html/rfc6749#section-4.1
    – Typel
    Sep 25 '19 at 20:02
  • Got it! So I had been using an example URL structure from one of the countless outdated examples floating out there on the web. The particular example I had borrowed from set the URL as &redirect_URI= but apparently this is case sensitive and needs to be &redirect_uri= . Thanks so much for your help, not using the My Domain setting was also a big part of the problem!
    – Typel
    Sep 25 '19 at 20:13
  • 1
    URLs are not case sensitive. Only parameters could be case sensitive if not handled properly while fetching them - either parameter name or value - which looks like it with this particular case Sep 26 '19 at 2:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.