Select to view content in your preferred language

Invalid token for arcgis api

137
1
04-30-2025 01:45 AM
Labels (2)
AppasahebAdekar
New Contributor

Hello,

When I use the URL https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/geocodeAddresses and an API token from Bruno, it works and provides a response. However, when we execute the same API by registering it into Azure APIM and call it with the Azure APIM endpoint, using the backend URL https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/geocodeAddresses, the response code is 200 but the body contains the following message:

 

{
"error": {
"code": 498,
"message": "Invalid Token",
"details": []
}
}

0 Kudos
1 Reply
AustinAverill
Frequent Contributor

Sounds like the token your generating isn't being generated with the proper referer, and therefore does not authenticate when crossing into Azure. You'll need to generate a token with the appropriate referer for the azure service that's consuming it.

0 Kudos