function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Santiago TacoSantiago Taco 

Username-Password OAuth Authentication Flow. error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

Hi everybody,
I am trying to use Rest API, I want to use the method User-Agent OAuth Authentication Flow. 
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_user_agent_oauth_flow.htm

But when I use this URI: 

https://login.salesforce.com/services/oauth2/authorize?response_type=token&client_id=3MVG9CEn_O3jvv..................................v8c20JARGLpzU8n8BB&redirect_uri=https%3A%2F%2Fmail%2Egoogle%2Ecom%2Fmail%2Fu%2F1%23inbox&state=mystate

I get this error message:

error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

Also I created a connected app and my Callback URL is:

https://mail.google.com/mail/u/1/#inbox

If I use this method Username-Password OAuth Authentication Flow:

https://login.salesforce.com/services/oauth2/token?grant_type=password&client_id=3MVG9CEn_O3jvv0xJWqiG...........R44rfMsyb1vuI4AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&client_secret=302826.......3314693&username=sto%40.com&password=svsdvvsdvvxvxcQsfsfsfszbbbhrxtxmQXtjbZoBsmMh6sYKMv

I could get the token and it is working.

Could someone help with this error?

 
GarryPGarryP
redirect URI should match what you are putting in your connected. it is case sensitive