ESRI geocoder not accepting API key

1011
1
Jump to solution
07-27-2021 09:16 AM
Labels (1)
JosephElfelt1
Occasional Contributor

This page http://esri.github.io/esri-leaflet/api-reference/tasks/geocode.html

Shows the following example under "Base classes”

L.esri.Geocoding.geocode({apikey: 'YOUR API KEY'}).text('380 New York St, Redlands, California, 92373').run(function (err, results, response) {
if (err) {
console.log(err);
return;
}
console.log(results);
});

When I use this code with my ESRI developer API key and my search string I get back the following error:

"code": 499,
"message": "Token Required",
"details": []

I would like to get this working since I am using my own search interface instead of ESRI's search control. What am I missing?

0 Kudos
1 Solution

Accepted Solutions
GavinRehkemper
Esri Contributor
1 Reply
GavinRehkemper
Esri Contributor

This was resolved in a GitHub issue: https://github.com/Esri/esri-leaflet-geocoder/issues/277