So I'm using the iOS Mobile SDK. I had an app working without issue, then changed the Consumer key to that of a different connected app (i.e. changed away from the default sample one) and updated the success URL as well.

Ever since then I've receieved this error when trying to sign in. I've killed all sessions, I've updated and saved that connected app, I've deleted the app, cleaned and rebuilt, and still no joy.

Anyone have any ideas? This message couldn't be any less useful.


  • Not putting this as an asnwer because it's not an answer, but I created a new iOS app with the same key and callback URL and it worked. Then I tried the first app, and it worked also. Who knows.
    – Matt Lacey
    Nov 20, 2015 at 2:31
  • Did you get any other ideas on this? I am getting the same, I have recreated the app 3 times and checked all elements, and still this error. I am just following the trailhead, so a bit frustrating.
    – dacology
    Dec 2, 2015 at 22:05

4 Answers 4


After much trial and error. I think this may be due to simple mis-configuration of the Connected App.

Check the Scopes closely. For my trailhead app I needed the api, web, refresh_token scopes. I had omitted one of these. Obviously the scopes required will vary for the app, but at a minimum we need these 3.

oauth scopes

Scope parameter docs: https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_oauth_scopes.htm&language=en_US

  • 1
    For me, it started to work once I added api and refresh_token scopes to the connected app.
    – DCBoy
    Feb 27, 2016 at 18:36
  • I was able to get it working when adding the basic info scope in addition to the ones mentioned above... interesting enough, it didn't work when I added "Full".
    – BradByte
    Jan 9, 2017 at 21:36
  • @Matthew - Are you running the tomcat on 8080 or 8443 ? Unfortunately this solution not working for me. Could you please share the code? Oct 14, 2017 at 17:21

For me, the same issue was fixed by using sfdx force:auth:device:login

Instead of authorizing via web login flow, I logged in using a device code.

Also, check that your salesforce instance has Salesforce CLI properly installed.


You may get this error if the scope param in your authorizationUrl request DOES NOT match the scopes you've added to the connected app.

For example:


When you don't have the full scope on the connected app.

  • 1
    This is what got me past it (for now). Thank you for sharing this. Feb 1, 2022 at 12:50

Go to Setup>>Connected Apps>>Salesforce CLI>>Edit Policies>>IP Relaxation>>Relax IP restrictions. This worked for me. Other workarounds to try are:

  • Log out completely from browser and try again.
  • Clear Cache and try again.

You must log in to answer this question.

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