Hello,
Can anyone provide guidance on how to pass a token to a secured geometry REST service? I am getting error 498 "Invalid Token".
Here is where I am testing it:
https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer?token=MYTOKEN&f=json
{"error":{"code":498,"message":"Invalid Token","details":[]}}
I set the token expiration way out, so it is not because it is expired.
Thanks.
Your request looks fine to me. I don't think the AGOL geometry service requires a token (ie it's public), so it may not accept tokens at all.
Thank you Thomas. That makes sense.
So moving away from the cloud test now, is there a way we can tell on our own geometry service if it is accepting a token? All we can see right now is that we get the 403 error in the browser where we cannot get to it or make url posts from the browser.
I would try hitting the same route that you posted above with and without a token and see what message the server is responding with.
If the service isn't accepting valid tokens I'm not sure how to troubleshoot that unfortunately.