I'm trying to generate a token to access
http://landscape1.arcgis.com/arcgis/rest/services/USA_Geology_Units/MapServer
var params = {
username: username
password: password
//referer: 'http://l' + $(location).attr("host") + '/',
referer: 'http://landscape1.arcgis.com/arcgis/rest',
expiration: 1440,
f: "json"
};
$.ajax({
url: "https://www.arcgis.com/sharing/rest/generateToken?",
type: "POST",
dataType: "json",
data: params,
success: function (data) {
the token in the data object is not working, the landscape1 just redirects to the login page.
Any ideas?