<?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: 498 Invalid Token error with esriConfig.apiKey in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351631#M82838</link>
    <description>&lt;P&gt;Glad to hear it works now! That is possible it could have been a service issue.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2023 19:07:08 GMT</pubDate>
    <dc:creator>LaurenBoyd</dc:creator>
    <dc:date>2023-11-20T19:07:08Z</dc:date>
    <item>
      <title>498 Invalid Token error with esriConfig.apiKey</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351515#M82829</link>
      <description>&lt;P&gt;I'm receiving an error when providing an API Key using the JS SDK version 4.27. Same behavior for 4.25. This had previously been working:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;loadModules([
    'esri/config',
    'esri/Map',
    'esri/views/MapView', 
]).then(([esriConfig, Map, MapView]) =&amp;gt; {
    esriConfig.apiKey = 'xxxxx';

    const map = new Map({
        basemap: 'topo-vector',
    });
    
    const view = new MapView({
        viewDiv: 'test',
        map: map
    });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Obviously, substituting our actual API key for 'xxxxx'. This is hitting the following URL:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json?f=json&amp;amp;token=xxxxx" target="_blank"&gt;https://cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json?f=json&amp;amp;token=xxxxx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="roberth_0-1700495541615.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86558i6F08BEC884148916/image-size/medium?v=v2&amp;amp;px=400" role="button" title="roberth_0-1700495541615.png" alt="roberth_0-1700495541615.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Without providing an API key, it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This had been working previously, as my developer account has historical usage. I've also tested a different API key and receive the same error. Structurally there's not much else going on in the code, and it's the same approach mentioned by official documentation:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/tutorials/display-a-map/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/tutorials/display-a-map/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="roberth_1-1700495611530.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86559i0F1724EA3B88059A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="roberth_1-1700495611530.png" alt="roberth_1-1700495611530.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 15:58:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351515#M82829</guid>
      <dc:creator>roberth</dc:creator>
      <dc:date>2023-11-20T15:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: 498 Invalid Token error with esriConfig.apiKey</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351624#M82836</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/740569"&gt;@roberth&lt;/a&gt;&amp;nbsp;does your API work when you try to use it in the tutorial's solution?&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/tutorials/display-a-map/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/tutorials/display-a-map/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wondering if this is specific to your application. Also, was there a specific version of the JavaScript Maps SDK where this stopped working for you since you mentioned this had been working previously?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 18:56:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351624#M82836</guid>
      <dc:creator>LaurenBoyd</dc:creator>
      <dc:date>2023-11-20T18:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: 498 Invalid Token error with esriConfig.apiKey</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351630#M82837</link>
      <description>&lt;P&gt;Lo and behold it works now. I think it was just a temporary service disruption.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 19:05:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351630#M82837</guid>
      <dc:creator>roberth</dc:creator>
      <dc:date>2023-11-20T19:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: 498 Invalid Token error with esriConfig.apiKey</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351631#M82838</link>
      <description>&lt;P&gt;Glad to hear it works now! That is possible it could have been a service issue.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 19:07:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351631#M82838</guid>
      <dc:creator>LaurenBoyd</dc:creator>
      <dc:date>2023-11-20T19:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: 498 Invalid Token error with esriConfig.apiKey</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351636#M82840</link>
      <description>&lt;P&gt;That's very strange. It sounds like something happened to the API Key. I would try making a new one and testing it out. The workflow still works (I just checked). But I would also recommend not using an API Key in the app if it's not needed.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 19:25:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1351636#M82840</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2023-11-20T19:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: 498 Invalid Token error with esriConfig.apiKey</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1374291#M83453</link>
      <description>&lt;P&gt;I am using apiKey and also app token to identify my app in my angular arcgis application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but when i am loading a image layer&amp;nbsp;&lt;A href="https://env1.arcgis.com/arcgis/rest/services/Sentinel2_10m_LandCover/ImageServer" target="_blank"&gt;https://env1.arcgis.com/arcgis/rest/services/Sentinel2_10m_LandCover/ImageServer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;the key/token is causing the imagelayer can not be loaded.&amp;nbsp;&lt;BR /&gt;and if i delete the apikey/token, i got a arcgis online login popup window, i can loaded this image layer after the user/pass is filled in the popup.&lt;BR /&gt;&lt;BR /&gt;how to solve this problem? how to avoid the arcgis online login popup and load this imagelayer?&lt;BR /&gt;can i use usersession to achieve this?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2024 09:27:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/498-invalid-token-error-with-esriconfig-apikey/m-p/1374291#M83453</guid>
      <dc:creator>fenglinhan</dc:creator>
      <dc:date>2024-01-25T09:27:34Z</dc:date>
    </item>
  </channel>
</rss>

