403 Forbidden Error While Requesting from Python

Hello,

I’m facing a 403 Forbidden Error while doing a GET request of Routing API with valid parameters and URL using the “requests” library of Python. However, I can still see the response on web browser and not using Python script. Can someone let me know what could be the issue? Do I need to get a paid membership of TomTom to run it with Python?

What does the response body contain?
It could be a wrong API key, wrong referrer header…

1 Like

When I run the script it only gives me <Response [403]>. I’ve re-checked all my parameters and API key, they are fine. Below is the screenshot of my script I’m trying to run.

I just checked this request with my API key and it works. So I’d suggest to check your API key if it is copied properly and if it has Routing API added.

1 Like

Thanks for checking. Could you please elaborate what does adding Routing API to the key means? Is that some configuration that I need to do?

I think I understood what you meant. I created a new key for Routing API specifically and it works! Thanks a lot!

1 Like

I was about to make a screenshot from the Dashboard. I’m glad it works now.

1 Like