Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using the ArcGIS Javascript API to connect to the portal. To do so I am calling portal.signIn(). The issue is that I don't want the user to be responsible for performing the login, bo I want to generate the REST API token on my server and then use that token from the Javascript API.

Mock code

portal = new esri.arcgis.Portal('');
dojo.connect(portal, 'onLoad', function() {"<server-side writes token here>";


From what I can tell in this sample

I might be able to build my own credentials object to run (which from what I understand is an implementation of esri.IdentityManager). I will try this and report back if it works.

share|improve this question
You can hard code a 'Long-lived' Token into your script… but must use the token service of arcgis server to generate it. – Mapperz Jan 2 '13 at 22:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.