<?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 How to generate token for RESTAPIs in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-generate-token-for-restapis/m-p/1502273#M4788</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I generated a token by following the process mentioned in the developer documentation, using dummy URLs to check the APIs in Postman. However, when I try to make a GET request, it shows an invalid token.&amp;nbsp;&lt;/SPAN&gt;Can someone please help me on this or identify where I made mistake ?&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2024 07:29:51 GMT</pubDate>
    <dc:creator>UJJWALSINGH</dc:creator>
    <dc:date>2024-07-08T07:29:51Z</dc:date>
    <item>
      <title>How to generate token for RESTAPIs</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-generate-token-for-restapis/m-p/1502273#M4788</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I generated a token by following the process mentioned in the developer documentation, using dummy URLs to check the APIs in Postman. However, when I try to make a GET request, it shows an invalid token.&amp;nbsp;&lt;/SPAN&gt;Can someone please help me on this or identify where I made mistake ?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 07:29:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-generate-token-for-restapis/m-p/1502273#M4788</guid>
      <dc:creator>UJJWALSINGH</dc:creator>
      <dc:date>2024-07-08T07:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate token for RESTAPIs</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-generate-token-for-restapis/m-p/1502325#M4789</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/812551"&gt;@UJJWALSINGH&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I typically use this function here in Python to generate the token:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;def GetToken(username, password):

    url = f'https://www.arcgis.com/sharing/generateToken?f=json&amp;amp;username={username}&amp;amp;password={password}&amp;amp;referer=http://www.arcgis.com'

    json = requests.get(url+'&amp;amp;f=json').json()

    return json['token']&lt;/LI-CODE&gt;&lt;P&gt;Once the token is returned, this is how I enter it into Postman to use for testing purposes:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CodyPatterson_0-1720437350794.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109005iC77BA5AD80D06C80/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CodyPatterson_0-1720437350794.png" alt="CodyPatterson_0-1720437350794.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Postman will need to take the token as a Bearer Token, once that is input, everything should work fine!&lt;/P&gt;&lt;P&gt;If that doesn't end up working, let me know and I'll see what I can find!&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 11:16:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-generate-token-for-restapis/m-p/1502325#M4789</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2024-07-08T11:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate token for RESTAPIs</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-generate-token-for-restapis/m-p/1512120#M4801</link>
      <description>&lt;P&gt;Thank you! this is working&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 06:22:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-generate-token-for-restapis/m-p/1512120#M4801</guid>
      <dc:creator>UJJWALSINGH</dc:creator>
      <dc:date>2024-07-30T06:22:54Z</dc:date>
    </item>
  </channel>
</rss>

