AnsweredAssumed Answered

How to use generateToken endpoint properly?

Question asked by AgencyDev on Mar 7, 2019
Latest reply on Mar 7, 2019 by AgencyDev

Hi,

I'm trying to generate token for my client.

My /rest/info edpoint returns me json like:

{"currentVersion":10.61,"fullVersion":"10.6.1.227","owningSystemUrl":"https://www.arcgis.com","owningTenant":"xxxxxx","authInfo":{"isTokenBasedSecurity":true,"tokenServicesUrl":"https://www.arcgis.com/sharing/generateToken"}}

If I try to use tokenServicesUrl as an endpoint for generating token then I get error "Invalid username or password" even when my username and password are correct.

curl -X POST \
 https://www.arcgis.com/sharing/generateToken \
 -F f=json \
 -F username=$USERNAME\
 -F password=$PASSWORD
 -F client=requestip \
 -F expiration=21600

 

I tried change param client and referer, it doesn't help.

Could you help me to solve this issue if it is possible?

Outcomes