Hi All,
I am geocoding a bunch of addresses via locator.addressesToLocations and receiving the exception "Unexpected token '<', \"<!DOCTYPE \"... is not valid JSON" in return, the geocoding service I am using is the World server i.e. https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer.
However if I run the other method addressToLocations for single address then it is working fine. I am also using my apiKey as well. Any help provided will be appreciated.
Do you have a code sample, like with codepen or stackblitz, or github? Are you setting the esri/config apiKey? The geocode-api service requires an api key used as a token in the ArcGIS Map SDK for JS.
Here is the code and yes I am using apiKey as well: