Token Expiration

4970
1
02-06-2014 06:28 PM
WesleyAskew
New Contributor III
I am developing Javascript applications using secured services from ArcGIS Online.  I access these services through token based authentication from which the token is obtained through the following site: https://www.arcgis.com/sharing/generateToken?username=yourUserName&password=yourPassword&referer=htt....  I am wondering if it is possible to extend the expiration length of the tokens.  I have tried by changing the "expiration=" in the URL to the maximum allowed.  Right now, they seem to expire after ten days or so.  I would like for them to atleast be valid for a year, if not permanent.  Is there another method of obtaining a long lengthed token for AGOL secured services?
Tags (2)
0 Kudos
1 Reply
BjornSvensson
Esri Regular Contributor
...Javascript applications using secured services from ArcGIS Online.  ... token based authentication ... is possible to extend the expiration length of the tokens.  ...Is there another method of obtaining a long lengthed token for AGOL secured services?


"The maximum value of the expiration time is controlled by the server."
http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Generate_Token/02r3000000m5000000/

A better solution is probably to use a proxy.  We recently made a set of updated proxies available on https://github.com/Esri/resource-proxy that work well with ArcGIS Online secured services.
0 Kudos