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
BenedictBenedict 

redirect_url mismatch error for REST authorization

I am using the following html page as the login page for my REST app. But I am getting consistently the redirect_url mismatch error. I have checked the url and I am sure that the url string is correct. I have also tried other urls but the error keeps popping up. What am I doing wrong?

 

<html>
    <body> <%-- onLoad="document.authorizationForm.submit()">  --%>
    <form action="https://login.salesforce.com/services/oauth/authorize" method="post" name="authorizationForm">    
      <input type="hidden" name="response_type" value="code"/>    
      <input type="hidden" name="client_id" value="3MVG9rFJvQRVOvk6sl7xMXtrbyQb2XUv2vprLKWv0uxBLKFzNqtHJG6cmzuemPYDB3hPwqXsBlw0BGQPkb81P"/>
      <input type="hidden" name="redirect_url" value="https://10.132.35.240:8443/"/>
    </form>
  </body>
</html>

 

 

 

error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration
Best Answer chosen by Admin (Salesforce Developers) 
penguinatorpenguinator

Replying so that others can find it when they do a Google search...

 

The Salesforce documentation is incorrect. At http://www.salesforce.com/us/developer/docs/api_rest/Content/intro_understanding_web_server_oauth_flow.htm the parameter is listed as "request_url" which is wrong. It must be passed as "request_uri".

 

Assuming the "request_uri" passed in matches your Remote Access application's "Callback URL" setting as shown http://wiki.developerforce.com/page/Getting_Started_with_the_Force.com_REST_API you should be good to go.

 

I've submitted feedback on the page identifying the documentation error.

All Answers

Afzal MohammadAfzal Mohammad

Hi,

 

Am hitting the same issue.

Were you able to resolve the issue?

 

Cheers,

penguinatorpenguinator

Replying so that others can find it when they do a Google search...

 

The Salesforce documentation is incorrect. At http://www.salesforce.com/us/developer/docs/api_rest/Content/intro_understanding_web_server_oauth_flow.htm the parameter is listed as "request_url" which is wrong. It must be passed as "request_uri".

 

Assuming the "request_uri" passed in matches your Remote Access application's "Callback URL" setting as shown http://wiki.developerforce.com/page/Getting_Started_with_the_Force.com_REST_API you should be good to go.

 

I've submitted feedback on the page identifying the documentation error.

This was selected as the best answer
sfdcfoxsfdcfox
I was going to submit that, but you've beat me to it. 10 months later, they still haven't fixed a single character typo...