AnsweredAssumed Answered

Pass Token to World Geocode Service - Invalid Token

Question asked by citizens on Oct 21, 2013
Latest reply on Nov 25, 2013 by gdrower
I have to use python and the REST API to geocode records against the ArcGIS Online World Geocoding service.

I can successfully request a token, but when the token is passed as part of the geocode request I get an error message returned that it is invalid, with no other information. I've tried passing it as a url parameter and/or a header and both.

If I omit the the token and the forStorage parameter I can successfully obtain a response as expected, but I can't use this method because I need to store the results.

The server that the python script is running on is a VM in a Microsoft hosting environment. The token request requires the referring "website". In this case it is not a website, but a server so I am substituting the IP address of the server, assuming this is how the geocoding service is validating the geocode request. I've tried both the internal and external IP addresses, but neither have worked.

The docs recommend not using the REST API, but I have no choice in this case.

I need to know more about how the geocoding service is validating the token and how it interprets "websites" or in my case an ip address.

Any help would be much appreciated.

Outcomes