<?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: Authentication Using Token No Longer Works in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811715#M2478</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tokens expire, are you sure yours didn't?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Aug 2020 15:03:18 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-08-05T15:03:18Z</dc:date>
    <item>
      <title>Authentication Using Token No Longer Works</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811713#M2476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been accessing our ArcGIS Online site via token in ArcGIS Python API without any issues for the past couple of months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I seem to be having issues authenticating via an access token now.&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.8pt;"&gt;&lt;SPAN style="color: #cc7832;"&gt;from &lt;/SPAN&gt;arcgis.gis &lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;GIS&lt;/PRE&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.8pt;"&gt;gis = GIS(&lt;SPAN style="color: #aa4926;"&gt;url&lt;/SPAN&gt;=portal&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;token&lt;/SPAN&gt;=accessToken)&lt;/PRE&gt;&lt;P&gt;In the API references , I also realised that it mentions the below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE style="color: #404040; background-color: #fcfcfc; border: 1px solid #e1e4e5; margin-bottom: 24px;"&gt;&lt;TBODY&gt;&lt;TR class=""&gt;&lt;TD style="background-color: transparent; border-bottom: 0px solid #e1e4e5; border-left: 0px solid #e1e4e5; font-size: 14.4px; padding: 8px 16px;"&gt;&lt;P style="font-size: 0.9rem;"&gt;token&lt;/P&gt;&lt;/TD&gt;&lt;TD style="background-color: transparent; border-bottom: 0px solid #e1e4e5; border-left: 1px solid #e1e4e5; font-size: 14.4px; padding: 8px 16px;"&gt;&lt;P style="font-size: 0.9rem;"&gt;Optional string. This is the Enterprise token for built-in logins. This parameter is only honored if the username/password is None and the security for the site uses BUILT-IN security.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Our AGOL site is configured with Enterprise Login and I use the token authentication to login with my Enterprise login.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did something change recently and is this still a supported method of authentication? It has significant ramifications to our org if it is no longer supported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Weng&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 06:29:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811713#M2476</guid>
      <dc:creator>WengNg1</dc:creator>
      <dc:date>2020-08-05T06:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication Using Token No Longer Works</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811714#M2477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not familiar with method of authentication but would be happy to take a look. Can you share where you normally get the token from?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 12:20:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811714#M2477</guid>
      <dc:creator>GeoJosh</dc:creator>
      <dc:date>2020-08-05T12:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication Using Token No Longer Works</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811715#M2478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tokens expire, are you sure yours didn't?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 15:03:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811715#M2478</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-08-05T15:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication Using Token No Longer Works</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811716#M2479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the following method( grant type = authorization code) to get an access token :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/rest/users-groups-and-items/token.htm" title="https://developers.arcgis.com/rest/users-groups-and-items/token.htm"&gt;Token—ArcGIS REST API | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then , I use the access token generated to authenticate using ArcGIS Python API as mentioned above .&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 15:24:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811716#M2479</guid>
      <dc:creator>WengNg1</dc:creator>
      <dc:date>2020-08-05T15:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication Using Token No Longer Works</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811717#M2480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I realise it is short lived for AGOL (30 mins), but pretty sure the token worked as I can append it to the end of my site's URL to access REST .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 15:28:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811717#M2480</guid>
      <dc:creator>WengNg1</dc:creator>
      <dc:date>2020-08-05T15:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication Using Token No Longer Works</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811718#M2481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally found the issue, the solution was actually pretty simple:&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; border: 0px; font-size: 9.8pt;"&gt;gis = GIS(&lt;SPAN style="color: #aa4926; border: 0px; font-weight: inherit; font-size: 13.0667px;"&gt;url&lt;/SPAN&gt;=portal&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 13.0667px;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926; border: 0px; font-weight: inherit; font-size: 13.0667px;"&gt;token&lt;/SPAN&gt;=accessToken)&lt;/PRE&gt;&lt;P&gt;only supports portal = &lt;A href="https://www.arcgis.com"&gt;https://www.arcgis.com&lt;/A&gt;&amp;nbsp;as documented in the API reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you set it to your own portal's URL, it will not work. So the solution was to set it to the default&amp;nbsp;&lt;A href="https://www.arcgis.com/" style="color: #2989c5; text-decoration: none;"&gt;https://www.arcgis.com&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:38:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/authentication-using-token-no-longer-works/m-p/811718#M2481</guid>
      <dc:creator>WengNg1</dc:creator>
      <dc:date>2020-08-13T10:38:44Z</dc:date>
    </item>
  </channel>
</rss>

