How to link Geocoding JS API to our account?

163
4
02-19-2020 01:48 PM
MohamedMezian1
New Contributor II

We're using the arcgis-rest-geocoding GEOCoding API, and it is working fine. But I suppose it is metered, while it is not connected to our account, right ?

But how to do it ? It is currently working fine the way it is.

Thanks !

0 Kudos
4 Replies
Noah-Sager
Esri Regular Contributor

I don't believe that there is any metering going on with the free geocoding operations, but this doc may help you decide when to use your ArcGIS Online account (or ArcGIS for Developers account) for geocoding operations:

Free vs. paid operations—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers 

MohamedMezian1
New Contributor II

Thanks Noah, that's exactly what I wanted to figure out !

MohamedMezian1
New Contributor II

Unfortunately, the process listed here involves using the secret key to generate a token for each request: 

Authenticate a request to the World Geocoding Service—ArcGIS REST API: World Geocoding Service | Arc... 

This means I have to create an API endpoint for the sole purpose of generating tokens...


Isn't there another way which doesn't involve the creation of an API endpoint ?

Thanks

0 Kudos
Noah-Sager
Esri Regular Contributor

I'm not sure I understand your workflow, but perhaps an ArcGIS Online hosted proxy service would work. You can create a custom service URL that is based on your account credentials with whitelisted domains.

Working with Proxy Services | ArcGIS for Developers 

As an example, look at the URL for the RouteTask in this sample (it's using that ArcGIS Online hosted proxy service)

ArcGIS API for JavaScript Sandbox 

If this doesn't work for you, could you please briefly describe what your workflow or goal is?

0 Kudos