Share via

Testing the Maps Spatial API

Anonymous
2023-06-29T13:55:42.47+00:00

I want to test the Spatial - Get Closest Point. I'm trying to follow the docs to get the UDID.

To test this API, you can upload the sample data from Post Closest Point APIexamples(Request Body) viaData Upload APIand replace the [udid] from thesample request below with the udid returned by Data Upload API.

When I uploaded the sample data to Data - Upload Preview to get the UDID in the response I get a status 202. I use the URL in the Location Header as the docs said, but when I open the page, I receive the following:

{
  "error": {
    "code": "Unauthorized",
    "message": "Bearer realm=\"https://atlas.microsoft.com/\", SharedKey realm=\"https://atlas.microsoft.com/\"",
    "target": "WWW-Authenticate",
    "details": []
  }
}

Does anyone have any experience with this?

Azure Maps
Azure Maps

An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.


Answer accepted by question author
  1. rbrundritt 21,706 Reputation points Volunteer Moderator
    2023-06-30T14:40:59.5766667+00:00

    The URL in the location header likely does not include authenitication details. If using a subscription key for auth, you will need to append that to the URL, like locationUrl + '&subscription-key=<Your Azure Maps Subscription key>'

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.