<?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: ArcGIS Server 'Invalid Token' from application, using REST API  in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662558#M3218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'day All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the answer, from our local support, to our specific use case:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;After reviewing your case and undertaking some research, unfortunately it appears that this functionality is not available using App Login to access Feature Services via ArcGIS Enterprise. In the documentation you have listed below please see the last sub heading 'Available content and services' which lists what you can access using App Login.&lt;BR /&gt; &lt;BR /&gt; Another related bit of documentation is 'Limitations of App Login' found here -&amp;nbsp;&lt;A href="https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/limitations-of-application-authentication/"&gt;https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/limitations-of-application-authentication/&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt; Your use case has been submitted by other Esri customers as an enhancement to be made to the ArcGIS Enterprise product:&lt;BR /&gt; &lt;BR /&gt; ENH-000117119 - 'Provide an ability to use the token generated using client id and client secret of a web application to access a feature service in ArcGIS Enterprise.'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mind you, we did set the service to public as a test and it still failed. Keeping the service as public was not an option anyways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2020 04:44:40 GMT</pubDate>
    <dc:creator>BushtelAdmin</dc:creator>
    <dc:date>2020-07-24T04:44:40Z</dc:date>
    <item>
      <title>ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662553#M3213</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 am struggling with an issue relating to ArcGIS Server REST API. I believe we are running v 10.6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My process is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create an 'application' in the ArcGIS Server content.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;IMG __jive_id="492126" class="image-1 jive-image" height="454" src="https://community.esri.com/legacyfs/online/492126_pastedImage_3.png" width="496" /&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Copy the 'client_id' and 'client_secret' values from this application.&lt;/LI&gt;&lt;LI&gt;Call the ArcGIS REST API &lt;STRONG&gt;oauth2/token&lt;/STRONG&gt;&amp;nbsp;endpoint&lt;/LI&gt;&lt;LI&gt;Copy the 'access_token' into the &lt;SPAN&gt;ArcGIS REST API&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/query&lt;/STRONG&gt; endpoint&lt;/LI&gt;&lt;LI&gt;I am receiving a 'invalid token' error code 498.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have completed this exact process in my organisation's ArcGIS Online platform, with no issues. So I am very perplexed and frustrated that this isn't working &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My token request:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POST /arcgis/sharing/rest/oauth2/token?client_id=XXX&amp;amp;client_secret=XXX&amp;amp;grant_type=client_credentials HTTP/1.1&lt;BR /&gt;Host: &amp;lt;domain&amp;gt;:&amp;lt;port&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My query request:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;GET /arcgis/rest/services/Hosted/&amp;lt;feature layer name&amp;gt;/FeatureServer/0/query?where=1=1&amp;amp;token=XXX&amp;amp;f=json&amp;amp;outFields=name,device_type&lt;/P&gt;&lt;P&gt;HTTP/1.1&lt;BR /&gt;Host:&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;lt;domain&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;lt;port&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I copy a token from my Chrome browser (f12 debug mode/network tab) I am able to make both requests successfully!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am 'admin' on our server and I own both the application and the feature layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**update I tried running the /registerApp endpoint (using a browser&amp;nbsp;Token)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;"error": {&lt;BR /&gt; "code": 500,&lt;BR /&gt; "message": "Unable to register app.",&lt;BR /&gt; "details": [&lt;BR /&gt; "'redirect_uris' invalid"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know what the purpose of the redirect_uris attribute is; I have tried &amp;lt;domain&amp;gt;:&amp;lt;port&amp;gt; and&amp;nbsp;urn:ietf:wg:oauth:2.0:oob to no effect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2020 00:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662553#M3213</guid>
      <dc:creator>JackSilburn</dc:creator>
      <dc:date>2020-05-14T00:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662554#M3214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/333952"&gt;Jack Silburn&lt;/A&gt;‌, Can you provide more information on what you are trying to do after you have receive the token? Are you trying to create a web application and provide some sort of authentication mechanism? Have you consider using the ArcGIS JS IdentityManager?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The redirect_uri is a list of valid URI that is allowed for redirecting when user have successfully login&lt;/P&gt;&lt;P&gt;For example if you look at&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/index.html"&gt;Access ArcGIS Online items using OAuthentication | ArcGIS API for JavaScript 4.15&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and their live example&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/live/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/live/index.html"&gt;Access ArcGIS Online items using OAuthentication - 4.15&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you click on sign in, you will see it redirect the user to the login page for AGOL. IN the request you will see the redirect_uri telling AGOL once the user have successfully signed in, redirect the user back to the redirect_uri link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="492131" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/492131_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This link HAS TO BE valid and added in your app registration&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="492132" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/492132_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2020 06:20:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662554#M3214</guid>
      <dc:creator>VictorTey</dc:creator>
      <dc:date>2020-05-14T06:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662555#M3215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Victor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am&amp;nbsp;trying to enable my program to automatically update a feature layer (hosted on ArcGIS Server).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my understanding, and past implementation with ArcGIS Online, I should simply need to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create an 'app'&lt;/LI&gt;&lt;LI&gt;Copy its client ID and secret&lt;/LI&gt;&lt;LI&gt;Use these to receive an 'access token'&lt;/LI&gt;&lt;LI&gt;Use the 'access token' in all future actions - i.e. update, delete, query etc.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This appears to be the same issue experienced by these users:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/thread/220077"&gt;Tokens returned from Portal oauth2 are invalid for accessing hosted features through the REST API&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/thread/209945"&gt;REST API rejecting just-generated token with "498 - Invalid Token"&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/thread/245845"&gt;Why does token-based security work for AGOL but not for AGEnt?&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/thread/171874"&gt;Getting 498: Invalid Token from AGS Server after performing Token Exchange&lt;/A&gt;&amp;nbsp; (3200+ views and no response!)&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/thread/82832"&gt;https://community.esri.com/thread/82832&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The approach to authenticating REST API requests in AGOL vs ArcGIS Server seems to be different - despite referencing the same documentation. At least in my opinion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't have to&amp;nbsp;bother with 'redirect URIs' at all with my AGOL implementation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 01:23:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662555#M3215</guid>
      <dc:creator>JackSilburn</dc:creator>
      <dc:date>2020-05-15T01:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662556#M3216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jack,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever find a solution to this I have a python script that mines my REST endpoint that has been completely stopped because of this error. Any ideas on how to solve this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2020 18:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662556#M3216</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-06-02T18:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662557#M3217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'day Jack&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems to be a popular question on the form, and not a single answer.&lt;/P&gt;&lt;P&gt;Did you find an answer or does the issue go away with later versions of Enterprise?&lt;/P&gt;&lt;P&gt;We have the issue with 10.6.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 01:01:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662557#M3217</guid>
      <dc:creator>BushtelAdmin</dc:creator>
      <dc:date>2020-07-23T01:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662558#M3218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'day All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the answer, from our local support, to our specific use case:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;After reviewing your case and undertaking some research, unfortunately it appears that this functionality is not available using App Login to access Feature Services via ArcGIS Enterprise. In the documentation you have listed below please see the last sub heading 'Available content and services' which lists what you can access using App Login.&lt;BR /&gt; &lt;BR /&gt; Another related bit of documentation is 'Limitations of App Login' found here -&amp;nbsp;&lt;A href="https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/limitations-of-application-authentication/"&gt;https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/limitations-of-application-authentication/&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt; Your use case has been submitted by other Esri customers as an enhancement to be made to the ArcGIS Enterprise product:&lt;BR /&gt; &lt;BR /&gt; ENH-000117119 - 'Provide an ability to use the token generated using client id and client secret of a web application to access a feature service in ArcGIS Enterprise.'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mind you, we did set the service to public as a test and it still failed. Keeping the service as public was not an option anyways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2020 04:44:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662558#M3218</guid>
      <dc:creator>BushtelAdmin</dc:creator>
      <dc:date>2020-07-24T04:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662559#M3219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From memory, I made the&amp;nbsp;Feature Service 'visible to everyone' and edit permission enabled. This removed the requirement to authenticate requests to the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I justified this approach because:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;This was a prototype/proof of concept for a web app&lt;/LI&gt;&lt;LI&gt;The service is only shared within my Org&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the future I would definitely need Auth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you have any luck yourself?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2020 01:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662559#M3219</guid>
      <dc:creator>JackSilburn</dc:creator>
      <dc:date>2020-08-06T01:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662560#M3220</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;&lt;/P&gt;&lt;P&gt;I guess that settles it then - I wonder when/if the enhancement will be pushed through...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned to another user above, I ended up making the service public, with edit permissions enabled. It's peculiar that it did not work for you still.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would either need to figure out another method of authenticating, or move my app to my Org's ArcGIS Online platform, where the auth issue is not present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. It's a small world - I reckon we live in the same state!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2020 01:50:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662560#M3220</guid>
      <dc:creator>JackSilburn</dc:creator>
      <dc:date>2020-08-06T01:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662561#M3221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'day Jack&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/guide/working-with-different-authentication-schemes/" title="https://developers.arcgis.com/python/guide/working-with-different-authentication-schemes/"&gt;Working with different authentication schemes | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically Non-Interactive Login Experience.&lt;/P&gt;&lt;P&gt;This was changed with the last release of arcpy &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;Previously was suggested to add username and password to the Interactive example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS or Territory &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;We are thinking of (re)starting a 'usergroup' and if interested drop us an email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2020 02:21:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/662561#M3221</guid>
      <dc:creator>BushtelAdmin</dc:creator>
      <dc:date>2020-08-06T02:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/1215259#M4280</link>
      <description>&lt;P&gt;Has anyone managed to solve this? We're running into a similar issue.&amp;nbsp; Standard Portal Auth, nothing sophisticated.&amp;nbsp; It's worked for months with mobile clients connecting and synchronizing and suddenly poof.&amp;nbsp; If we reboot the server everything works for about 2 hours and then falls apart.&lt;/P&gt;&lt;P&gt;This error shows up on all services on the server.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Failed to return the service configuration 'XYZ.MapServer'. Server machine '&lt;A href="https://myserver.domain:7443/arcgis/sharing/rest/search" target="_blank"&gt;https://myserver.domain:7443/arcgis/sharing/rest/search&lt;/A&gt;' returned an error. 'Invalid token.'&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 20:09:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/1215259#M4280</guid>
      <dc:creator>KierenTinning2</dc:creator>
      <dc:date>2022-09-22T20:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server 'Invalid Token' from application, using REST API</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/1500716#M4786</link>
      <description>&lt;P&gt;I was able to solve this but I was forced to use a different OAuth flow than the client_credentials flow. I too was hoping to pass in a client_id and client_secret and query the FeatureServer programmatically.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Instead, to acquire a token which permitted a query of the feature layer, I had to use the user flow (not happy about this but have tried everything else)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;curl &lt;/SPAN&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;SPAN&gt;location &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://www.arcgis.com/sharing/rest/generateToken" target="_blank"&gt;https://www.arcgis.com/sharing/rest/generateToken&lt;/A&gt;'&lt;/SPAN&gt;&lt;SPAN&gt; \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;SPAN&gt;header &lt;/SPAN&gt;&lt;SPAN&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/SPAN&gt;&lt;SPAN&gt; \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;SPAN&gt;form &lt;/SPAN&gt;&lt;SPAN&gt;'username="your_personal_username"'&lt;/SPAN&gt;&lt;SPAN&gt; \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;SPAN&gt;form &lt;/SPAN&gt;&lt;SPAN&gt;'password="your_personal_password"'&lt;/SPAN&gt;&lt;SPAN&gt; \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;SPAN&gt;form &lt;/SPAN&gt;&lt;SPAN&gt;'client="referer"'&lt;/SPAN&gt;&lt;SPAN&gt; \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;SPAN&gt;form &lt;/SPAN&gt;&lt;SPAN&gt;'expiration="60"'&lt;/SPAN&gt;&lt;SPAN&gt; \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;SPAN&gt;form &lt;/SPAN&gt;&lt;SPAN&gt;'f="json"'&lt;/SPAN&gt;&lt;SPAN&gt; \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;SPAN&gt;form &lt;/SPAN&gt;&lt;SPAN&gt;'referer="&lt;A href="https://localhost" target="_blank"&gt;https://localhost&lt;/A&gt;"'&lt;BR /&gt;&lt;BR /&gt;With this cURL request, you can translate this into your language or tool of choice.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Wish they would just fix this.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Jul 2024 02:37:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-invalid-token-from-application-using/m-p/1500716#M4786</guid>
      <dc:creator>MattScachette</dc:creator>
      <dc:date>2024-07-03T02:37:46Z</dc:date>
    </item>
  </channel>
</rss>

