Geocode Access Denied

1359
4
05-09-2022 11:12 AM
herasey
New Contributor

I am getting a 403 response when trying to use the geocoding api.

I am even adding "forStorage=false" to the request url, but still, I am getting this message:

"Token is valid but access is denied.","details":["User does not have permissions to store geocoding results.]

I even tried just sending a request and not even storing the results in memory/variable. still the same results. Why is it assuming I am permanently storing the geocoding results?

this is in a next.js app.

 

 

const getEm = async (address) => {
    await fetch(`https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/geocodeAddresses?f=json&token=${process.env.NEXT_PUBLIC_ARCGIS_API_KEY}&address=${address}&forStorage=false&maxResults=1`)
}

 

0 Kudos
4 Replies
Raul_Jimenez
Esri Contributor

Hi @herasey,

This request is working for me:

https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?token=MY_API_KEY&f=pjson&singleLine=1600%20Pennsylvania%20Ave%20NW,%20DC&forStorage=false&maxResults=1

It sounds like your API key is not configured correctly (API key configuration panel). 

Screenshot 2022-05-13 at 13.40.46.png

Note: any changes on that configuration can take up to 10min to propagate across the different servers

Maybe you can test it using the Geocoding Postman collection we made available.

I hope that helps.

0 Kudos
herasey
New Contributor

nope. It's configured properly. it was working for over a day, so i highly doubt that would be the issue. Still, all I get is "token is valid but access is denied" because it assumes I am storing results.

DenisEspinosa
New Contributor

did you fix the issue?

0 Kudos
Raul_Jimenez
Esri Contributor

Sorry I missed the last messages.

That's weird, if you want, we can schedule a 30min call and try to find out what's going on. 

 

0 Kudos