<?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: Display a map in CodePen: code 498 invalid token error in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-map-in-codepen-code-498-invalid-token/m-p/1580270#M86444</link>
    <description>&lt;P&gt;Actually I can replicate this and it's an issue with the referer.&amp;nbsp; When I look at the request in the console that gets blocked it's getting sent from&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;A href="https://cdpn.io/" target="_blank" rel="noopener"&gt;https://cdpn.io/&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Setting the referrer to that might work&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 30 Jan 2025 00:16:28 GMT</pubDate>
    <dc:creator>Sage_Wall</dc:creator>
    <dc:date>2025-01-30T00:16:28Z</dc:date>
    <item>
      <title>Display a map in CodePen: code 498 invalid token error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-map-in-codepen-code-498-invalid-token/m-p/1580247#M86442</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm running the Display a map sample in CodePen.&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/tutorials/display-a-map/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/tutorials/display-a-map/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;All the code in CodePen is exactly identical to the tutorial, except the part&amp;nbsp;&lt;SPAN class=""&gt;apiKey&lt;/SPAN&gt;&lt;SPAN class=""&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;"YOUR_ACCESS_TOKEN" was replaced with my API key.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The API key was generated on Location Platform. Expiration date is&amp;nbsp;&lt;SPAN&gt;12/31/2025, and the referrers just contain one item which is&amp;nbsp;&lt;A href="https://codepen.io/" target="_blank" rel="noopener"&gt;https://codepen.io/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Error message shown in CodePen console is as follows. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;What could be problems with the API key, and how to fix the error?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;"[esri.Basemap]" "#load()" "Failed to load basemap (title: 'Basemap', id: '194b4471ad7-basemap-0')" // [object Object]&lt;BR /&gt;{&lt;BR /&gt;"name": "request:server",&lt;BR /&gt;"message": "Token Invalid.",&lt;BR /&gt;"details": {&lt;BR /&gt;"url": "&lt;A href="https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps/arcgis/topographic" target="_blank" rel="noopener"&gt;https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps/arcgis/topographic&lt;/A&gt;",&lt;BR /&gt;"requestOptions": {&lt;BR /&gt;"query": {&lt;BR /&gt;"language": "en",&lt;BR /&gt;"places": null,&lt;BR /&gt;"worldview": null,&lt;BR /&gt;"token": "AAPTxy8BH1V***********"&lt;BR /&gt;},&lt;BR /&gt;"signal": {}&lt;BR /&gt;},&lt;BR /&gt;"ssl": false,&lt;BR /&gt;"httpStatus": 498,&lt;BR /&gt;"messages": [&lt;BR /&gt;"The required authentication information is invalid. The token is either invalid or has expired."&lt;BR /&gt;],&lt;BR /&gt;"raw": {&lt;BR /&gt;"code": 498,&lt;BR /&gt;"message": "Token Invalid.",&lt;BR /&gt;"details": [&lt;BR /&gt;"The required authentication information is invalid. The token is either invalid or has expired."&lt;BR /&gt;],&lt;BR /&gt;"restInfoUrl": "&lt;A href="https://basemapstyles-api.arcgis.com/arcgis/rest/info" target="_blank" rel="noopener"&gt;https://basemapstyles-api.arcgis.com/arcgis/rest/info&lt;/A&gt;"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 23:12:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-map-in-codepen-code-498-invalid-token/m-p/1580247#M86442</guid>
      <dc:creator>Wehara</dc:creator>
      <dc:date>2025-01-29T23:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Display a map in CodePen: code 498 invalid token error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-map-in-codepen-code-498-invalid-token/m-p/1580267#M86443</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/874507"&gt;@Wehara&lt;/a&gt;&amp;nbsp;, When you created your API key did you assign it the location services basemap privilege?&amp;nbsp;&lt;A href="https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/tutorials/create-an-api-key/#select-privileges" target="_blank"&gt;https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/tutorials/create-an-api-key/#select-privileges&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 00:02:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-map-in-codepen-code-498-invalid-token/m-p/1580267#M86443</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2025-01-30T00:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Display a map in CodePen: code 498 invalid token error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-map-in-codepen-code-498-invalid-token/m-p/1580270#M86444</link>
      <description>&lt;P&gt;Actually I can replicate this and it's an issue with the referer.&amp;nbsp; When I look at the request in the console that gets blocked it's getting sent from&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;A href="https://cdpn.io/" target="_blank" rel="noopener"&gt;https://cdpn.io/&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Setting the referrer to that might work&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Jan 2025 00:16:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-map-in-codepen-code-498-invalid-token/m-p/1580270#M86444</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2025-01-30T00:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Display a map in CodePen: code 498 invalid token error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-map-in-codepen-code-498-invalid-token/m-p/1580296#M86445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much. Update the referrer then it's ok now.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 04:05:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-map-in-codepen-code-498-invalid-token/m-p/1580296#M86445</guid>
      <dc:creator>Wehara</dc:creator>
      <dc:date>2025-01-30T04:05:46Z</dc:date>
    </item>
  </channel>
</rss>

