<?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 ArcGIS REST API Token Management in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-rest-api-token-management/m-p/679980#M3318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am building a custom widget for use with the Web AppBuilder and it will be using the REST API.&amp;nbsp; I am struggling with how to manage the token once it is acquired.&amp;nbsp; My logic thus far is that the widget will get a token when it is initialized.&amp;nbsp; Where I am stuck is: a) how to check for an expiration, b) when to check for an expiration.&amp;nbsp; I thought about getting a new token with every request, but that doesn't seem right.&amp;nbsp; What is the strategy for token management?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2020 18:37:33 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-08-13T18:37:33Z</dc:date>
    <item>
      <title>ArcGIS REST API Token Management</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-rest-api-token-management/m-p/679980#M3318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am building a custom widget for use with the Web AppBuilder and it will be using the REST API.&amp;nbsp; I am struggling with how to manage the token once it is acquired.&amp;nbsp; My logic thus far is that the widget will get a token when it is initialized.&amp;nbsp; Where I am stuck is: a) how to check for an expiration, b) when to check for an expiration.&amp;nbsp; I thought about getting a new token with every request, but that doesn't seem right.&amp;nbsp; What is the strategy for token management?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2020 18:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-rest-api-token-management/m-p/679980#M3318</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-13T18:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS REST API Token Management</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-rest-api-token-management/m-p/679981#M3319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Damon DelNegro,&lt;/P&gt;&lt;P&gt;Since your code/app is generating the token in the first place, you can set an expiration parameter. If not set, by default tokens generated have expiration of 60 minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using ArcGIS JS – IdentityManager – it has generateToken method – here’s the link&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;If you have any additional questions please feel free to &lt;A href="https://bit.ly/34gfdpk"&gt;contact us&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;arcgis-insight‌ arcgis&amp;nbsp;rest api&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2020 16:40:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-rest-api-token-management/m-p/679981#M3319</guid>
      <dc:creator>HarishPalaniappan</dc:creator>
      <dc:date>2020-08-20T16:40:55Z</dc:date>
    </item>
  </channel>
</rss>

