I am attempting to setup a simple nodejs application to geocode addresses, which is based on the following blog post
In doing so, I went through the process of setting up an account then setting up an ApiKey with my developer account. I also gave it access to the geocoding feature. However in every case, I keep getting an error
ArcGISAuthError: 498: Invalid Token
at checkForErrors (***/test-arcgis/node_modules/@esri/arcgis-rest-request/dist/cjs/request.js:145:23)
at /***/test-arcgis/node_modules/@esri/arcgis-rest-request/dist/cjs/request.js:366:30
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
originalMessage: 'Invalid Token',
code: 498,
response: { error: { code: 498, message: 'Invalid Token', details: [] } },
url: 'https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates',
options: {
httpMethod: 'POST',
params: {
f: 'json',
address: 'N Main st',
postal: 38103,
countryCode: 'USA'
},
authentication: ApiKeyManager {
portal: 'https://www.arcgis.com/sharing/rest',
key: '***jGmAOVb'
},
headers: {}
}
}
I am not quite sure how to resolve this or determine if I set it up correctly
I have gone through a series of online resources and have not been able to find the correct way to set this up.
Any assistance is appreciated.
Any assistance
Same issue... the docs suggest you can use an api key or an access token, but it does not accept the api key. This can be caused by incorrect referrers.