TL;DR : for security reasons and analytics. API stands for application programming interface. When you use our location services (our APIs), we need a way to identify that it's your application that's making the request to use the service (API). Thanks to the API Key we can:
Prevent abuse
Provide you with some useful analytics
How to get an API key for Maps APIs
To get your API key, you first need to be registered for the TomTom Developer Portal. If you don't have an account, no worries! now before continuing.
Once you are registered, go to your and locate the key that you would like to use (we’ve created first one for you, it’s called My first API key).
Copy the key
And you're done! You can now explore - we recommend trying out our examples, tutorials and tech articles on our blog.
Happy coding :)
How to use TomTom API Keys?
Eager to see the result right away? Here is an example that we’ve prepared for you to get started. Remember to replace Your_API_Key with your own key (that you can grab from the dashboard). Then paste the whole query in your browser address bar and hit enter.
You should now see a map tile containing the whole world. Success!
Let’s now look at a more general example. Through the documentation on Developer Portal, you will find API request URL formats looking somewhat like the one below: Replace Your_API_Key with your API key and baseUrl with api.tomtom.com. Then replace required parameters according to the service documentation (you’ll find all the details in the Required parameters tables inside each endpoint documentation) and you are ready to make your second request with TomTom APIs. Remember that you can also evaluate TomTom APIs with our API Explorer (Maps, Search, Routing, Traffic) without writing a line of code.
How to try out Maps SDK for Web in CodePen using my API Key?
In the Maps SDK for Web’sexamples section you will be prompted to provide the API key to open the examples in CodePen. You can use any of the keys from your dashboard:
However in examples that require access to multiple services you need to check if the API key that you are using is a key valid for all the products required by the example. If not, you will have to use two keys like in the example below: