Hi
I have a simple application that finds the nearest UFO sightings when the user enters a city and clicks search. A popup will display the UFO sighting and show details and how far from the city entered.
I have created the credentials in the new Arcgis platform for developers, I have created an apiKey and assigned the proper privileges to my local application and hosted service in AGOL:
and referenced in the code. My ApiKey is set to expire at the end of the month. However, I'm still getting unable to authorize access without token. I thought based on the esri documentation my application only needs the apikey to access the services such as places.
You can view code at https://github.com/mnavidad/UFOSIGHTINGSAPP/ use vite to run code
There seems to be a bit of confusion, but from what I have tested and understand.
The newly released API keys in Esri Location Platform (formerly esri platform) only works with featureServices that have been uploaded into the same account - Not AGOL. Accessing features in AGOL still requires the standardised Esri authentication.
Hi James
thank you for your response, pardon I do not follow, my feature service has been loaded or it is hosted in the account I had to create that is an AGOL account that is tied to the Arcgis platform for developers.
@mnoel2- I believe this is the case where there's a bit of confusion.
So to use a API key - you must create a separate esri location platform account and host your featureService from there. This is different from a developer account associated with an AGOL account.
Only then I believe the API key will work for accessing the content, otherwise you'll need to follow standard esri authentication guidelines around using oAuth