HERE API - Matrix routing yields "These credentials do not authorize access"

100 views Asked by At

If I try to use the Matrix Routing service, I get the following error message:

  "error": "Forbidden",
  "error_description": "These credentials do not authorize access"

I created a free Here developer account to use the Matrix Routing service. When I go to my Subscription & Billing Overview and look at my products in the Subscription, I see that "Matrix Routing" is included in my plan. However, when I go to Services in the Launcher and select my project, the "Matrix Routing" service is no longer suggested. As a result, when I make the following request in Python:

import requests,json

url = f'https://matrix.router.hereapi.com/v8/matrix?apiKey={MY_API_KEY}&async=false'
headers = {'Content-Type': 'application/json'}

payload = {
    "origins": [
        { "lat": 37.76, "lng": -122.42 },
        { "lat": 40.63, "lng": -74.09 },
        { "lat": 30.26, "lng": -97.74 }
    ],
    "regionDefinition": {
        "type": "world"
    },
    "matrixAttributes": ["distances"]
}

r = requests.post(url, headers=headers, data=json.dumps(payload))

print(json.dumps(r.json(), indent=2))

the error message:

  "error": "Forbidden",
  "error_description": "These credentials do not authorize access"

Where can I activate that I can use matrix routing?

0

There are 0 answers