Call API in browser - beginner question

Hi,

Complete beginner question, I know. I am trying to call the API in my browser but can’t get it to work.

Example URL I have written: https://api.openrouteservice.org/v2/matrix/driving-car?Authorization=MYKEY&locations=[[9.70093,48.477473],[9.207916,49.153868],[37.573242,55.801281],[115.663757,38.106467]]

Where MYKEY is my API key. I get the following error:
“error”: “Authorization field/api_key missing in request. If you do not have a token, please sign up for one at https://openrouteservice.org

I know I have probably got the formatting wrong, so would love some pointers on how to make it right.

Thanks in advance!

Hi @David.Hasselberg,

you can’t send POST requests in the browser URL as you need to specify the body.
Please check out documentation for the matrix api.
If you are logged in and have a valid api key, click on example code.
You can paste the curl example into your bash/terminal/command line and the requests should provide a response.

I would suggest using postman for custom post requests.

Best regards