How to use generateToken endpoint properly?

812
1
Jump to solution
03-07-2019 06:48 AM
AgencyDeveloper
New Contributor II

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?

0 Kudos
1 Solution

Accepted Solutions
AgencyDeveloper
New Contributor II

I found answer - https://community.esri.com/thread/176923#comment-607851 
My question is a complete duplicate.

View solution in original post

0 Kudos
1 Reply
AgencyDeveloper
New Contributor II

I found answer - https://community.esri.com/thread/176923#comment-607851 
My question is a complete duplicate.

0 Kudos