ArcGIS Server tokens - generateToken not working

878
0
05-28-2019 03:03 AM
DaveAdams
New Contributor III

I have secured services on ArcGIS Server 10.6.1 which I am trying to query using the ArcGIS Rest API. If I use the token service in a web browser and fill in the parameters then I can happily generate a token.

i.e. https://<domain>/ags/tokens/generateToken

If I try and use postman (POST request) or a python script using the REST API however, the request is unsuccessful e.g.

 

I am using a web adaptor for web access and the name is not arcgis but ags. I can see from the response that the API seems to be expecting the adaptor to be named arcgis and realise that this issue came up before and there was a bug raised that the web adaptor should use the default name arcgis but the thread suggested that this issue had been fixed from 10.2 :

https://community.esri.com/thread/111516

I was hoping to avoid renaming the web adaptor on the server as a workaround. Does anyone have any suggestions why using the browser works but requests fail through code?

Any help would be gratefully received.

Dave

Tags (1)
0 Kudos
0 Replies