phofer

Access Geonrich from Browser

Discussion created by phofer on May 29, 2014
I've generated a token using this

https://www.arcgis.com/sharing/generateToken?username=user&password=pass&referer=http://XXX.XXX.XXX.XXX/&expiration=15&f=json

where XXX.XXX.XXX.XXX is my IP address

and then submitted a request with this

http://geoenrich.arcgis.com/arcgis/rest/services/World/GeoEnrichmentserver/GeoEnrichment/enrich?StudyAreas=[{%22sourceCountry%22:%22US%22,%22layer%22:%22US.ZIP5%22,%22ids%22:[%2292373%22]}]&dataCollections=[%22KeyGlobalFacts%22]&f=pjson&token=...

through my browser, but I keep getting the response

{
"error": {
  "code": 498,
  "message": "Invalid Token",
  "details": []
}
}

What am I doing wrong?

edit: lol, never mind. This documentation could use some work...

Outcomes