Esri / esri-leaflet

A lightweight set of tools for working with ArcGIS services in Leaflet. :rocket:
https://developers.arcgis.com/esri-leaflet/
Apache License 2.0
1.61k stars 799 forks source link

Examples in Documentation return 401 error #1387

Closed dennisdebel closed 9 months ago

dennisdebel commented 9 months ago

Description

Following the instructions on https://developers.arcgis.com/esri-leaflet/maps/display-a-map/ with my own correct API key results in 401 error and not map being displayed. Both on CodePen, locally and on my own https server.

Link to page

https://developers.arcgis.com/esri-leaflet/maps/display-a-map/

Link to CodePen

https://codepen.io/dennisdebel/pen/abxorxJ (obviously redacted API key)

gavinr-maps commented 9 months ago

Hi, can you please post a link to the codepen?

dennisdebel commented 9 months ago

Added to the original post!

gavinr-maps commented 9 months ago

Hi, when I put an API key into your codepen, it works ok for me:

image

So I would guess that maybe you need to use a correct API key.

I'm going to close this issue since it's not an issue with the Esri Leaflet code. If you continue to have challenges with using Esri Leaflet, please post in the Esri Community or reach out to Esri Tech Support. Thanks!

dennisdebel commented 9 months ago

Dear @gavinr-maps, I see the confusion now, I used the default API key that is present when you create an account. When I generated a new one, the exampled worked! Maybe it is an idea not to give a new user a default non working API key (what is the rationale behind this? as example?), but instead force a new user to generate a new key.