AnsweredAssumed Answered

unable to use the generated token on the http request

Question asked by jude@jointer.co on Jul 13, 2017
Latest reply on Jul 19, 2017 by DStauning-esristaff

i have tried to create a token using get request like this:

https://www.arcgis.com/sharing/generateToken?username=????&password=??&referer=www.jointer.co&expiration=60&f=json

 

i get a token as a response 

{"token":"???-??-JVXl73TwrkGdHN_UCe0RqzMAg8LzSOrg..","expires":1499954199890,"ssl":false}

I copied to token into the http request

 

https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/Enrich?studyareas=[{"geometry":{"x": -122.435, "y": 37.785} ,"areaType":"RingBuffer", "bufferUnits":"esriMiles", "bufferRadii":[1,3,5] }] &analysisvariables=[{"KeyGlobalFacts.TOTPOP","itemid":"YourItemID","url":"www.arcgis.com","token":"???-??-JVXl73TwrkGdHN_UCe0RqzMAg8LzSOrg.."}]&f=pjson

 

and got the response :

{
      "error" :

         {
                "code" : 401,
                  "message" : "You do not have permissions to use this resource.",
                    "details" : [ ]
          }
}

Outcomes