<?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: How to request a layer with a token in the Javascript API 4.x? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613022#M57355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice!, i was wondering if that was added in the 3.20 version but no.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html" title="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html"&gt;FeatureLayer | API Reference | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Apr 2017 20:31:24 GMT</pubDate>
    <dc:creator>EvelynHernandez</dc:creator>
    <dc:date>2017-04-06T20:31:24Z</dc:date>
    <item>
      <title>How to request a layer with a token in the Javascript API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613020#M57353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Help please!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying add a layer to a map using the JS API 4.x. This layer is a feature layer and it has a token to access to it.&lt;/P&gt;&lt;P&gt;In the Esri Javascipt I was add the layer just by specifying the token in the URL.&lt;/P&gt;&lt;P&gt;I am trying to do the same in 4.x however the app is always asking me for a user and password even if I already attached a valid token to the URL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var myUrl = 'www.randomAddress.com';&lt;BR /&gt; var token = 'xioxioxioxioxioxioxioxioxio............'&lt;BR /&gt; var featureLayer = new FeatureLayer({&lt;BR /&gt; url: myURL + "?token=" + token&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a new way to do this in 4.x?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the code of the app and also an screenshot. Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 19:59:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613020#M57353</guid>
      <dc:creator>CesarDuran</dc:creator>
      <dc:date>2017-04-06T19:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a layer with a token in the Javascript API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613021#M57354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cesar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The FeatureLayer Class has a token property.&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;var featureLayer = new FeatureLayer({&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;url: myURL&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;featureLayer.token = token;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 20:08:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613021#M57354</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-04-06T20:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a layer with a token in the Javascript API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613022#M57355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice!, i was wondering if that was added in the 3.20 version but no.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html" title="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html"&gt;FeatureLayer | API Reference | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 20:31:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613022#M57355</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2017-04-06T20:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a layer with a token in the Javascript API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613023#M57356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could probably just add the token parameter and value to the service URL e.g. [URL] + "&amp;amp;token=abc123"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 06:02:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613023#M57356</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2017-04-07T06:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a layer with a token in the Javascript API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613024#M57357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Robert,&lt;/P&gt;&lt;P&gt;Thank you very much for your response. I actually tried this before and I just did it again however I have the same result.&lt;/P&gt;&lt;P&gt;Do you know if there is any limitations with the Esri server versions and Esri JS API 4.x?&lt;/P&gt;&lt;P&gt;I tried the same token with 3.x and works fine. I am attaching an image with the object in 4.x that shows that the token is there.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Token and URL JS Object" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/345725_tokenAndUrl.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 12:34:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613024#M57357</guid>
      <dc:creator>CesarDuran</dc:creator>
      <dc:date>2017-04-07T12:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a layer with a token in the Javascript API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613025#M57358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this before and I had the same problem.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 12:34:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613025#M57358</guid>
      <dc:creator>CesarDuran</dc:creator>
      <dc:date>2017-04-07T12:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a layer with a token in the Javascript API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613026#M57359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cesar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;If that is not working then this sounds like a bug that needs to be reported to esri tech support. There is no version limitation that I am aware of.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 12:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613026#M57359</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-04-07T12:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a layer with a token in the Javascript API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613027#M57360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;I was afraid of it. Thank you very much for your help!&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 12:58:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-request-a-layer-with-a-token-in-the/m-p/613027#M57360</guid>
      <dc:creator>CesarDuran</dc:creator>
      <dc:date>2017-04-07T12:58:10Z</dc:date>
    </item>
  </channel>
</rss>

