<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using proxy with routing - getting a token not working in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-proxy-with-routing-getting-a-token-not/m-p/95819#M8781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to get the ArcGIS routing service to work through the proxy from a Javascript API app. In the proxy config I have the following setup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;serverUrl url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://route.arcgis.com" rel="nofollow" target="_blank"&gt;http://route.arcgis.com&lt;/A&gt;&lt;SPAN&gt;" matchAll="true"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientId="xxx"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientSecret="xxx"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rateLimit="50"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rateLimitPeriod="10"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;lt;/serverUrl&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I've setup the log file for reporting on proxy connections. In the log file I see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;w3wp.exe Information: 0 : 2014-10-24 12:29:01 &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve?f=json&amp;amp;returnDirections=true&amp;amp;returnRoutes=false&amp;amp;returnStops=false&amp;amp;returnBarriers=false&amp;amp;returnPolygonBarriers=false&amp;amp;returnPolylineBarriers=false&amp;amp;outSR=102100&amp;amp;directionsLengthUnits=esriNAUMiles&amp;amp;stops=%7B%22type%22%3A%22features%22%2C%22features%22%3A%5B%7B%22geometry%22%3A%7B%22x%22%3A%22-9811218.095255703%22%2C%22y%22%3A%225126606.098535776%22%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D%2C%7B%22geometry%22%3A%7B%22x%22%3A-9812193.264436342%2C%22y%22%3A5128099.7029343285%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D%5D%2C%22doNotLocateOnRestrictedElements%22%3Atrue%7D&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript29._jsonpCallback" rel="nofollow" target="_blank"&gt;http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve?f=json&amp;amp;returnDirections=true&amp;amp;returnRoutes=false&amp;amp;returnStops=false&amp;amp;returnBarriers=false&amp;amp;returnPolygonBarriers=false&amp;amp;returnPolylineBarriers=false&amp;amp;outSR=102100&amp;amp;directionsLengthUnits=esriNAUMiles&amp;amp;stops=%7B%22type%22%3A%22features%22%2C%22features%22%3A%5B%7B%22geometry%22%3A%7B%22x%22%3A%22-9811218.095255703%22%2C%22y%22%3A%225126606.098535776%22%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D%2C%7B%22geometry%22%3A%7B%22x%22%3A-9812193.264436342%2C%22y%22%3A5128099.7029343285%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D%5D%2C%22doNotLocateOnRestrictedElements%22%3Atrue%7D&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript29._jsonpCallback&lt;/A&gt;&lt;/P&gt;&lt;P&gt;w3wp.exe Information: 0 : 2014-10-24 12:29:03 Matching credentials found in configuration file. OAuth 2.0 mode: True&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;w3wp.exe Information: 0 : 2014-10-24 12:29:03 Service is secured by &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www.arcgis.com/sharing/oauth2/:" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/oauth2/:&lt;/A&gt;&lt;SPAN&gt; getting new token...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then it stops. The browser calling it returns a runtime error. If I manually call the oauth2 page with the correct details from the server running the proxy then it works fine and returns a token okay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please could someone give me any advice on how I can further debug this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Oct 2014 11:49:40 GMT</pubDate>
    <dc:creator>PeterBaldwin</dc:creator>
    <dc:date>2014-10-24T11:49:40Z</dc:date>
    <item>
      <title>Using proxy with routing - getting a token not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-proxy-with-routing-getting-a-token-not/m-p/95819#M8781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to get the ArcGIS routing service to work through the proxy from a Javascript API app. In the proxy config I have the following setup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;serverUrl url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://route.arcgis.com" rel="nofollow" target="_blank"&gt;http://route.arcgis.com&lt;/A&gt;&lt;SPAN&gt;" matchAll="true"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientId="xxx"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientSecret="xxx"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rateLimit="50"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rateLimitPeriod="10"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;lt;/serverUrl&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I've setup the log file for reporting on proxy connections. In the log file I see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;w3wp.exe Information: 0 : 2014-10-24 12:29:01 &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve?f=json&amp;amp;returnDirections=true&amp;amp;returnRoutes=false&amp;amp;returnStops=false&amp;amp;returnBarriers=false&amp;amp;returnPolygonBarriers=false&amp;amp;returnPolylineBarriers=false&amp;amp;outSR=102100&amp;amp;directionsLengthUnits=esriNAUMiles&amp;amp;stops=%7B%22type%22%3A%22features%22%2C%22features%22%3A%5B%7B%22geometry%22%3A%7B%22x%22%3A%22-9811218.095255703%22%2C%22y%22%3A%225126606.098535776%22%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D%2C%7B%22geometry%22%3A%7B%22x%22%3A-9812193.264436342%2C%22y%22%3A5128099.7029343285%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D%5D%2C%22doNotLocateOnRestrictedElements%22%3Atrue%7D&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript29._jsonpCallback" rel="nofollow" target="_blank"&gt;http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve?f=json&amp;amp;returnDirections=true&amp;amp;returnRoutes=false&amp;amp;returnStops=false&amp;amp;returnBarriers=false&amp;amp;returnPolygonBarriers=false&amp;amp;returnPolylineBarriers=false&amp;amp;outSR=102100&amp;amp;directionsLengthUnits=esriNAUMiles&amp;amp;stops=%7B%22type%22%3A%22features%22%2C%22features%22%3A%5B%7B%22geometry%22%3A%7B%22x%22%3A%22-9811218.095255703%22%2C%22y%22%3A%225126606.098535776%22%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D%2C%7B%22geometry%22%3A%7B%22x%22%3A-9812193.264436342%2C%22y%22%3A5128099.7029343285%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D%5D%2C%22doNotLocateOnRestrictedElements%22%3Atrue%7D&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript29._jsonpCallback&lt;/A&gt;&lt;/P&gt;&lt;P&gt;w3wp.exe Information: 0 : 2014-10-24 12:29:03 Matching credentials found in configuration file. OAuth 2.0 mode: True&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;w3wp.exe Information: 0 : 2014-10-24 12:29:03 Service is secured by &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www.arcgis.com/sharing/oauth2/:" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/oauth2/:&lt;/A&gt;&lt;SPAN&gt; getting new token...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then it stops. The browser calling it returns a runtime error. If I manually call the oauth2 page with the correct details from the server running the proxy then it works fine and returns a token okay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please could someone give me any advice on how I can further debug this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 11:49:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-proxy-with-routing-getting-a-token-not/m-p/95819#M8781</guid>
      <dc:creator>PeterBaldwin</dc:creator>
      <dc:date>2014-10-24T11:49:40Z</dc:date>
    </item>
  </channel>
</rss>

