<?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: Generate access token with ArcGIS REST API in ArcGIS Enterprise 10.8.1 in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/generate-access-token-with-arcgis-rest-api-in/m-p/1155512#M32787</link>
    <description>&lt;P&gt;So I managed to create a valid token using the generateToken endpoint:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="form-urlencoded.jpg" style="width: 813px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36788i4FB98E815497F75A/image-size/large?v=v2&amp;amp;px=999" role="button" title="form-urlencoded.jpg" alt="form-urlencoded.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I was using client=ip or client=requestip instead of client=referer and this was generating a token that wasn't valid. Still having problems generating a token with oauth2, app login. Can someone please provide an example?&lt;/P&gt;</description>
    <pubDate>Sun, 20 Mar 2022 11:43:50 GMT</pubDate>
    <dc:creator>andrei_ste</dc:creator>
    <dc:date>2022-03-20T11:43:50Z</dc:date>
    <item>
      <title>Generate access token with ArcGIS REST API in ArcGIS Enterprise 10.8.1</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/generate-access-token-with-arcgis-rest-api-in/m-p/1153743#M32736</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I would like to generate an access token with the ArcGIS REST API to access private content in ArcGIS Enterprise 10.8.1 either using the oauth2/token or generateToken endpoint. For both cases I managed to generate a token, but when I try to use them to access private services from the Portal I receive everytime an error with the code 498 and the message: &lt;STRONG&gt;Invalid Token&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Below I generate a token using oauth2 application credentials:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="token_oauth2.jpg" style="width: 696px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36366i04F9B66125745CCC/image-size/large?v=v2&amp;amp;px=999" role="button" title="token_oauth2.jpg" alt="token_oauth2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After that I try to use the token to get the information from the&amp;nbsp;&lt;SPAN&gt;ArcGIS REST Services Directory main page from a service that is shared privately, as a json response and get the error 'Invalid Token':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="token_oauth2_1.jpg" style="width: 979px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36368i914187A81F624E14/image-size/large?v=v2&amp;amp;px=999" role="button" title="token_oauth2_1.jpg" alt="token_oauth2_1.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone help please or did someone had this issue before? I used the same request to access private content from ArcGIS Online and it worked.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 10:00:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/generate-access-token-with-arcgis-rest-api-in/m-p/1153743#M32736</guid>
      <dc:creator>andrei_ste</dc:creator>
      <dc:date>2022-03-20T10:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Generate access token with ArcGIS REST API in ArcGIS Enterprise 10.8.1</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/generate-access-token-with-arcgis-rest-api-in/m-p/1155512#M32787</link>
      <description>&lt;P&gt;So I managed to create a valid token using the generateToken endpoint:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="form-urlencoded.jpg" style="width: 813px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36788i4FB98E815497F75A/image-size/large?v=v2&amp;amp;px=999" role="button" title="form-urlencoded.jpg" alt="form-urlencoded.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I was using client=ip or client=requestip instead of client=referer and this was generating a token that wasn't valid. Still having problems generating a token with oauth2, app login. Can someone please provide an example?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 11:43:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/generate-access-token-with-arcgis-rest-api-in/m-p/1155512#M32787</guid>
      <dc:creator>andrei_ste</dc:creator>
      <dc:date>2022-03-20T11:43:50Z</dc:date>
    </item>
  </channel>
</rss>

