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.

1 Answer 1


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
    Commented Sep 25, 2019 at 19:30
  • which OAuth flow are you trying to use? I noticed you are not passing the client secret. Commented Sep 25, 2019 at 19:55
  • Authorization Code Grant: tools.ietf.org/html/rfc6749#section-4.1
    – Typel
    Commented Sep 25, 2019 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
    Commented Sep 25, 2019 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 Commented Sep 26, 2019 at 2:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .