ArcGIS Online Invalid redirect_uri Error: 400

3456
2
03-16-2017 11:11 AM
JoseSanchez
Occasional Contributor III

Hello everyone,

All  tests are done inside the development server, opening IE or Google Chrome.

Using AGOL I created an ArcGIS  Online Application under MyContent, option "Add Item" --> "An Application"

for testing purposes I filled the section "Web Mapping Application Settings" with 2 different url.

  -  http://localhost/[AGOLwebApplication]  , this format works

 -  http://[developement server]/[AGOLwebApplication], this format fails

Then I went to Overview, View Application to open the application.

When  AGOL opens the Application, two scenarios:

 - it opens http://localhost/[AGOLwebApplication], It shows a popup window "Please sign in to continue". We  I select "OK" it works!!!

 -  it opens http://[developement server]/[AGOLwebApplication]  . In this case it shows a popup window "Please sign in to continue". We  I select "OK" the popup  returns an error message "ArcGIS Portal Directory  ... Invalid redirect_uri".

This is the URL with error:

https://mdc.maps.arcgis.com/sharing/oauth2/authorize?client_id=zhTXYHod2BqMxg1X&response_type=token&...

0 Kudos
2 Replies
JayantaPoddar
MVP Esteemed Contributor

FAQs—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

What should I do when I try to set the App ID and encounter an Invalid redirect_uri error?

It is indicated that the URI of Web AppBuilder is not added or set correctly in the Redirect URI list when you registered the App ID for Web AppBuilder in the ArcGIS portal. Complete the following steps:

  1. Go to /server directory of the Web AppBuilder installation, delete signininfo.json file.
  2. Review step 4. Update the existing App ID with the correct redirect URIs. see View and update app registration info. Alternatively, you can create a new App ID from the scratch.
  3. Refresh the browser running Web AppBuilder.
  4. Provide your App ID again, and click Continue.


Think Location
RebeccaStrauch__GISP
MVP Emeritus

Some others hints on resolving this can be found on my blog (older, but most is still helpful)

/blogs/myAlaskaGIS/2015/01/15/tips-and-observations-for-getting-web-appbuilder-developer-edition-ins...