nilsbabel

generateToken for ArcGIS.com hosted service

Discussion created by nilsbabel on May 28, 2014
Latest reply on Jun 3, 2014 by nilsbabel
I'm trying to use this sample to generate a token for a hosted feature service:
http://resources.arcgis.com/en/help/main/10.2/index.html#/Scripting_with_the_ArcGIS_Server_Administrator_API/0154000005r1000000/

However, the response sends back a 404 status.  Does anybody know what the server and port number should be for AGOL for organizations?  I've tried several variations:

www.arcgis.com
arcgis.com
maps.arcgis.com
usda.maps.arcgis.com
services1.arcgis.com/

I've tried several port numbers including 6080, 8080, 6443, and 443.  443 is the only port that will actually create a connection. 

For the tokenURL I have tried:
/arcgis/rest/generateToken
/arcgis/admin/generateToken
/arcgis/sharing/rest/generateToken

I feel like I must just have the wrong server, url, or port number.

Outcomes