Hi.
I am trying to use token based authentication to get access to a restricted map layer.
I can generate a token using the url:
https://<myserver>/arcgis/tokens/?request=gettoken&username=<my_user_name>&password=<my_password>&clientid=ref.http://<myserver>&expiration=1440
Then using the token in the url to access the map layer, I use:
https://<myserver>/arcgis/rest/services/AIR/MapServer/0?token=<mytoken>
But the url always redirects me to the 'ArcGIS Server REST API Login' screen. Can you help me with this by chance?
Thank you!