I'm using www.arcgis.com/sharing/generatetoken to obtain access tokens for query. Some of my services work, but others failed with "498, Invalid Token". The failed services are, by-and-large, backing store for Survey123.
I tried both generateToken, and generateToken (with serverURL.)
Thanks in advance.
PS. I'm able to access using OAuth token. So not completely dead in the water. But do want to know restrictions/limitations vis-a-vis generateToken.
Solved! Go to Solution.
Kelly,
How does the body of the request look when you're trying to generate the token
I'm using PowerShell to generate a token from AGOL and find content that is only shared to me which is working great for me
$body = @{
username="builtin username goes here"
password="builtin username password goes here"
expiration=60
referer="https://energyq.maps.arcgis.com"
f="json"
}
$LoginResponse = Invoke-WebRequest -Uri "https://www.arcgis.com/sharing/generateToken" -Body $body -Method "POST"
Kelly,
How does the body of the request look when you're trying to generate the token
I'm using PowerShell to generate a token from AGOL and find content that is only shared to me which is working great for me
$body = @{
username="builtin username goes here"
password="builtin username password goes here"
expiration=60
referer="https://energyq.maps.arcgis.com"
f="json"
}
$LoginResponse = Invoke-WebRequest -Uri "https://www.arcgis.com/sharing/generateToken" -Body $body -Method "POST"
thanks @AnthonyRyanEQL. but possibly needs some expert advises from Esri. it took us quite a bit. oh well. lessons learnt