2

Is there any way to tell, via the SOAP or REST APIs, if an ArcGIS Server map service requires an authenticated user?

I have set an application to use a token service for accessing secured map services, but I am trying to find if there is a quick way to tell whether or not the service requires a user to be logged-in.

1

The /arcgis/rest/info?f=pjson endpoint will have an authInfo property with this information:

Example: http://sampleserver6.arcgisonline.com/arcgis/rest/info?f=pjson

{
 "currentVersion": 10.3,
 "fullVersion": "10.3.0",
 "soapUrl": "http://sampleserver6.arcgisonline.com/arcgis/services",
 "secureSoapUrl": "https://sampleserver6.arcgisonline.com/arcgis/services",
 "authInfo": {
  "isTokenBasedSecurity": true,
  "tokenServicesUrl": "https://sampleserver6.arcgisonline.com/arcgis/tokens/",
  "shortLivedTokenValidity": 60
 }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.