<?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: Survey123 Rest API: How to use authentication token to generateReport? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-rest-api-how-to-use-authentication-token/m-p/1090914#M36638</link>
    <description>&lt;P&gt;Maybe someone will answer if they see that I also tried in postman:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoseVidal_0-1629485593692.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/21274iA31DDF8CB8A1EE78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoseVidal_0-1629485593692.png" alt="JoseVidal_0-1629485593692.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the above works to get my token. But then I do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoseVidal_1-1629485666503.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/21275i1F850D530D4E0A17/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoseVidal_1-1629485666503.png" alt="JoseVidal_1-1629485666503.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it still asking me to "Sign in to your ArcGIS Survey123 account"&lt;/P&gt;</description>
    <pubDate>Fri, 20 Aug 2021 18:55:07 GMT</pubDate>
    <dc:creator>JoseVidal</dc:creator>
    <dc:date>2021-08-20T18:55:07Z</dc:date>
    <item>
      <title>Survey123 Rest API: How to use authentication token to generateReport?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-rest-api-how-to-use-authentication-token/m-p/1089964#M36574</link>
      <description>&lt;P&gt;I'm trying to use the arcgis API to write a script that calls the GenerateReport REST API. The first step is to authenticate, and I am stuck there.&lt;/P&gt;&lt;P&gt;I first get the token with:&lt;/P&gt;&lt;PRE&gt;curl --location -g --request POST 'https://www.arcgis.com/sharing/rest/oauth2/token?&lt;BR /&gt;grant_type=client_credentials&amp;amp;&lt;BR /&gt;client_id=MYAPPID&amp;amp;&lt;BR /&gt;client_secret=MYAPPSECRET'&lt;/PRE&gt;&lt;P&gt;and that works, it returns:&lt;/P&gt;&lt;PRE&gt;{"access_token":"_J3J_S_6kgKgH9vwGx4cUGa2Vj4qC0odcoe9ZBscf8nOVRlrcizRbDJxDCPar9C6zfQyp4er3lNhl5IfGs8UV5TKLZXMKtDm9......etc",&lt;BR /&gt;"expires_in":7200}&lt;/PRE&gt;&lt;P&gt;But then I try to &lt;A href="https://developers.arcgis.com/survey123/api-reference/rest/report/#create-report" target="_self"&gt;create a report&lt;/A&gt; with&lt;/P&gt;&lt;PRE&gt;curl --location -g --request POST 'https://survey123.arcgis.com/api/featureReport/createReport?&lt;BR /&gt;featureLayerUrl=https://services.arcgis.com/oEazpvC7G00gPDRM/arcgis/rest/services/service_51c9906968804a1e89fedfc4804fad3f/FeatureServer&amp;amp;&lt;BR /&gt;queryParameters={}&amp;amp;&lt;BR /&gt;templateItemId=6b17895629ce4bcb87938d0381f721f2&amp;amp;&lt;BR /&gt;token=_J3J_S_6kgKgH9vwGx4cUGa2Vj4qC0odcoe9ZBscf8nOVRlrcizRbDJxDCPar9C6zfQyp4er3lNhl5IfGs8UV5TKLZXMKtDm9......etc'&lt;/PRE&gt;&lt;P&gt;and the response in an HTML page that says that I have to login.&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;&lt;P&gt;Note that the "app" I created in order to get the MYAPPID and MYAPPSECRET were created at&amp;nbsp;&lt;A href="https://uscgeography.maps.arcgis.com/" target="_blank"&gt;https://uscgeography.maps.arcgis.com/&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 15:28:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-rest-api-how-to-use-authentication-token/m-p/1089964#M36574</guid>
      <dc:creator>JoseVidal</dc:creator>
      <dc:date>2021-08-18T15:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Rest API: How to use authentication token to generateReport?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-rest-api-how-to-use-authentication-token/m-p/1090914#M36638</link>
      <description>&lt;P&gt;Maybe someone will answer if they see that I also tried in postman:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoseVidal_0-1629485593692.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/21274iA31DDF8CB8A1EE78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoseVidal_0-1629485593692.png" alt="JoseVidal_0-1629485593692.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the above works to get my token. But then I do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoseVidal_1-1629485666503.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/21275i1F850D530D4E0A17/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoseVidal_1-1629485666503.png" alt="JoseVidal_1-1629485666503.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it still asking me to "Sign in to your ArcGIS Survey123 account"&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 18:55:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-rest-api-how-to-use-authentication-token/m-p/1090914#M36638</guid>
      <dc:creator>JoseVidal</dc:creator>
      <dc:date>2021-08-20T18:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Rest API: How to use authentication token to generateReport?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-rest-api-how-to-use-authentication-token/m-p/1090923#M36639</link>
      <description>&lt;P&gt;I also tried login in with my useraneme+password, but the same thing happens. I can get the token, but the token does not work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoseVidal_2-1629486428184.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/21277i5D78BF2F49752AF1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoseVidal_2-1629486428184.png" alt="JoseVidal_2-1629486428184.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then I try to use the token:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoseVidal_3-1629486496150.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/21278iF36BCA2E560C5292/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoseVidal_3-1629486496150.png" alt="JoseVidal_3-1629486496150.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 19:09:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-rest-api-how-to-use-authentication-token/m-p/1090923#M36639</guid>
      <dc:creator>JoseVidal</dc:creator>
      <dc:date>2021-08-20T19:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Rest API: How to use authentication token to generateReport?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-rest-api-how-to-use-authentication-token/m-p/1513807#M58272</link>
      <description>&lt;P&gt;I believe you need to add the submitJob portion to the URL:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;'http://survey123.arcgis.com/api/featureReport/createReport/submitJob'&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Aug 2024 18:11:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-rest-api-how-to-use-authentication-token/m-p/1513807#M58272</guid>
      <dc:creator>EricKerneyASL</dc:creator>
      <dc:date>2024-08-01T18:11:59Z</dc:date>
    </item>
  </channel>
</rss>

