Http-code 403 error

Hi,

after trying my code many times yesterday i now run into an http-Code 403 error.
If i had reached the limit of requests it would be a http-Code 427 error instead.
So i wonder if my API-Key is blocked or something and if i can check that somewhere.
It worked many times before tho.

Thanks ahead

P.s.: Here my snippet:

pload = {“locations”: z, ‘destinations’: [0], ‘metrics’: [‘distance’]}
header = {‘Authorization’: config[‘or_api_key’]}
r = requests.post(‘https://api.openrouteservice.org/v2/matrix/driving-car’, json=pload, headers=header)

Hi @WyYu,

exceeding the minutely limit should return a 429 not a 427.
The 403 is issued if you go over your total daily quota, or the API key you pass is not authorized (wrong/expired/other access scope).
It also says that in the response body of the error :slight_smile: .

What you can alwasy do is check your quota in your openrouteservice dashboard, which will also show you when your quota will be renewed.

Best regards

2 Likes