<?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 Token in REST in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220858#M1087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not familiar with Integromat or webhooks, but I believe you need to create a POST request when generating a token.&amp;nbsp; For example, you could use &lt;A href="https://www.getpostman.com/"&gt;Postman &lt;/A&gt;to do this.&amp;nbsp; Try this app and check to make sure your parameters are correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Oct 2018 16:19:45 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2018-10-31T16:19:45Z</dc:date>
    <item>
      <title>Generate Token in REST</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220853#M1082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tryhing to generate an AGOL token using REST. WHat I have so far:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2FgenerateToken" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/generateToken&lt;/A&gt;&lt;SPAN&gt; HTTP/1.1?f=json&amp;amp;username=USERNAME&amp;amp;password=PASSWORD&amp;amp;client=requestip&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error I get:&lt;/P&gt;&lt;PRE style="color: #000000; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; word-wrap: break-word; white-space: pre-wrap;"&gt;{"error":{"code":400,"messageCode":"GWM_0002","message":"Invalid URL","details":[]}}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 15:24:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220853#M1082</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2018-10-31T15:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Token in REST</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220854#M1083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example on how to do this using python:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; json

tokenURL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest%2FgenerateToken" target="_blank"&gt;https://www.arcgis.com/sharing/rest/generateToken&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;
params &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'f'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'pjson'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'username'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; username&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'password'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; password&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'referer'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.arcgis.com" target="_blank"&gt;http://www.arcgis.com&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
response &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;post&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tokenURL&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; params&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; verify &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
token &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; response&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;json&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'token'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:46:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220854#M1083</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T10:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Token in REST</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220855#M1084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have the option to use Python, I have to use REST directly. Reason being is that I'm using Integromat and webhooks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 16:12:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220855#M1084</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2018-10-31T16:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Token in REST</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220856#M1085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Figured it out. Used the following URL:&amp;nbsp;&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/www.arcgis.com" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest/generateToken?f=pjson&amp;amp;username=myUserName&amp;amp;password=myPW&amp;amp;referer=http://www.arcgis.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 16:18:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220856#M1085</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2018-10-31T16:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Token in REST</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220857#M1086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried adding it to the URL:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;amp;token=yourtokenvalue&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 16:19:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220857#M1086</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2018-10-31T16:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Token in REST</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220858#M1087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not familiar with Integromat or webhooks, but I believe you need to create a POST request when generating a token.&amp;nbsp; For example, you could use &lt;A href="https://www.getpostman.com/"&gt;Postman &lt;/A&gt;to do this.&amp;nbsp; Try this app and check to make sure your parameters are correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 16:19:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220858#M1087</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2018-10-31T16:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Token in REST</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220859#M1088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Is there an option to receive the expiry time in minutes instead of milliseconds?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,'helvetica neue',verdana,sans-serif;"&gt;How can you remove the word token and expiry from the JSON response?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 16:53:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220859#M1088</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2018-10-31T16:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Token in REST</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220860#M1089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you format the JSON response to just have the token and no other text?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2018 16:44:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220860#M1089</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2018-11-08T16:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Token in REST</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220861#M1090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the python example I provided the response is a dictionary, so I can call the appropriate key ('token') to only receive that text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; font-size: 14px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;token &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit; font-size: 14px;"&gt;=&lt;/SPAN&gt; response&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;json&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit; font-size: 14px;"&gt;'token'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;]&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2018 16:23:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/generate-token-in-rest/m-p/220861#M1090</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2018-11-09T16:23:47Z</dc:date>
    </item>
  </channel>
</rss>

