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" : [ ]
}
}