One of our client uses the hosted ArcGIS service. I am trying to use one of their feature services via the JS API.
The URL of this feature server is something like this:
https://services8.arcgis.com/<some code>/ArcGIS/rest/services/<service name>/FeatureServer
As this service is not public, I understand that we need to generate a token to access this resource. This is something we do with our hosted GIS Servers.
For our hosted GIS server we use the token generation api at :
https://<local server name>/ArCGIS/tokens
But when we are not able to access this same API on the hosted server.
Have done quite a bit of googling and am seeing docs that mention a URL like /arcgis/tokens/generateToken
http://resources.arcgis.com/en/help/arcgis-rest-api/#/Generate_Token/02r3000000ts000000/
http://server.arcgisonline.com/arcgis/sdk/rest/index.html#/Generate_Token/02ss00000059000000/
But this does not work.
This help doc shows the various options for security out of which one is Token based and it says it works with ArcGIS Online. So what are we doing wrong?
ArcGIS Security and Authentication | ArcGIS for Developers
Is there something that needs to be enabled on the account?