<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using ArcGIS API for Python with no auth against a self-hosted geocoding service in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-arcgis-api-for-python-with-no-auth-against-a/m-p/1621770#M11438</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2597"&gt;@StaceMaples&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;While I have no direct experience with this I hopefully get you going in the right direction.&lt;/P&gt;&lt;P&gt;As you are not accessing a Portal (or AGOL) you may not need the GIS() call at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would try this based on the Geocoder &lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.geocoding.html#geocoder" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;## import Geocoder class
from arcgis.geocoding import Geocoder

## the URL to you Geocoder service
geocoder_url = "https://service.server.com/arcgis/rest/services/geocode/USA/GeocodeServer" 

## create a Geocoder object
geocoder = Geocoder(location = geocoder_url)

## batch geocode
## see https://developers.arcgis.com/python/latest/api-reference/arcgis.geocoding.html#geocoder
## for properties and mehods available for the Geocoder class.
geocoder.batch_geocode(
    addresses = [],
    ...
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let us know if this is of any help or solves your problem.&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Glen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jun 2025 07:20:50 GMT</pubDate>
    <dc:creator>Clubdebambos</dc:creator>
    <dc:date>2025-06-09T07:20:50Z</dc:date>
    <item>
      <title>Using ArcGIS API for Python with no auth against a self-hosted geocoding service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-arcgis-api-for-python-with-no-auth-against-a/m-p/1621359#M11435</link>
      <description>&lt;P&gt;I'm running a geocoding service on ArcGIS Server, using a Web Adapter, and no Portal.&lt;/P&gt;&lt;P&gt;The service has no authentication on it, as the server is scoped to our internal IP range.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to figure out how to batch geocode against my service using the ArcGIS API for Python, which seems pretty straightforward, except that I can't figure out how to authenticate as an anon user. The examples in the Authentication guidance are for a portal instance, which I don't have.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;gis = GIS()&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Doesn't seem to work. I keep getting the&amp;nbsp; error:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;Exception&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;: Token required but not passed in the request. &lt;/SPAN&gt;&lt;SPAN&gt;Token required. &lt;/SPAN&gt;&lt;SPAN&gt;(Error Code: 499)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Again, there is no auth on the server, at all. I can submit simple GET requests all day long, successfully, but would like to use the Python API for what I am trying to do, right now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The service endpoint is similar to the following, if it's informative:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;https://&lt;EM&gt;service.server.com&lt;/EM&gt;/arcgis/rest/services/geocode/USA/GeocodeServer&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts or guidance is appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stace&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Jun 2025 20:47:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-arcgis-api-for-python-with-no-auth-against-a/m-p/1621359#M11435</guid>
      <dc:creator>StaceMaples</dc:creator>
      <dc:date>2025-06-05T20:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using ArcGIS API for Python with no auth against a self-hosted geocoding service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-arcgis-api-for-python-with-no-auth-against-a/m-p/1621770#M11438</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2597"&gt;@StaceMaples&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;While I have no direct experience with this I hopefully get you going in the right direction.&lt;/P&gt;&lt;P&gt;As you are not accessing a Portal (or AGOL) you may not need the GIS() call at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would try this based on the Geocoder &lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.geocoding.html#geocoder" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;## import Geocoder class
from arcgis.geocoding import Geocoder

## the URL to you Geocoder service
geocoder_url = "https://service.server.com/arcgis/rest/services/geocode/USA/GeocodeServer" 

## create a Geocoder object
geocoder = Geocoder(location = geocoder_url)

## batch geocode
## see https://developers.arcgis.com/python/latest/api-reference/arcgis.geocoding.html#geocoder
## for properties and mehods available for the Geocoder class.
geocoder.batch_geocode(
    addresses = [],
    ...
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let us know if this is of any help or solves your problem.&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Glen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 07:20:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-arcgis-api-for-python-with-no-auth-against-a/m-p/1621770#M11438</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2025-06-09T07:20:50Z</dc:date>
    </item>
  </channel>
</rss>

