Select to view content in your preferred language

Token Generation for ArcGis online Login For Organizations: please help me out

3236
1
07-25-2012 10:54 AM
JesilDsilva
New Contributor
Hi,
I am trying to generate a token for a username and password for logging into arcgis online using https://atlas.resources.ca.gov/ArcGI.../gettoken.html token service, I am not able to generate a token using the token. I gave my username and password, and gave the referer as www.arcgis.com, still it throwing an error.. i am very new to this with very few programming skills.. please help me out.

After the token generation i need to use it for auto login too.
Help is greatly appreciated..
Thanks all, God bless
Tags (2)
1 Reply
BenStewart
Deactivated User
I'm in a similar boat, have you found a solution? I have been investigating the portal API and I thought the following would work, but I get an error of invalid Token

//Get authentication information
portal = new esri.arcgis.Portal(displayOptions.portalUrl);
portal.signIn().then(function(loggedInUser) { 
     token = loggedInUser.credential.token; 
})
var mapUrl = "https://services.arcgis.com/iQ1dY19aHwbSDYIF/arcgis/rest/services/GAFSP_Temp/FeatureServer/1?token=" + token
0 Kudos