Docs › Get started
Keys
The three kinds of Wazli Maps API key (website, phone app, server), which one you need, how to send it and how to get one from the Wazli team.
Three kinds of key
A key's kind comes from where it may be used. The Wazli team sets this when making the key.
| Kind | Where it works | Keep it secret? |
|---|---|---|
| Website key | Only on the websites listed on the key, from a browser. | No: it is meant to sit in your page. |
| Phone app key | Only in the apps listed on the key. Each call sends the X-Wazli-App header with your app id. | Keep it out of public code. |
| Server key | Only from a server. A call from a web page is refused (server_key_in_browser). | Yes, always. |
A key can be both a website key and a phone app key: it then works on its websites and in its apps.
Which one do I need?
- A map or address box in a web page: a website key.
- A map in an iPhone or Android app: a phone app key.
- Calls from your own backend, or Map styles: a server key.
How websites are matched
A website is listed as its whole address with https://, for example https://roadly.com. It matches that exact site only, so https://www.roadly.com is a different entry.
https://*.roadly.com matches every subdomain of roadly.com over https. For building on your own computer, http://localhost:3000 can be listed too.
Sending the key
Send it as ?key= in the address or in the X-Wazli-Key header. The website kit sends ?key= for you. Phone apps also send their app id:
GET https://map.wazli.com/api/maps/v1/reverse?lat=28.538&lng=-81.379
X-Wazli-Key: YOUR_APP_KEY
X-Wazli-App: com.example.myappOne key, several products
A key holds one or more products (Map, Autocomplete, Geocoding, Nearby, Directions), each with its own daily limit. A Map styles key is always a server key of its own.
Getting a key
Ask the Wazli team at wazli.com/contact. Tell us your project, the websites (with https://) or app ids, the products you need and about how many calls a day you expect. Self-serve keys come later.
Keeping keys safe
- Never put a server key in a web page, a phone app or a public code repository.
- If a key leaks, ask the Wazli team to replace it. The old key stops working within a minute.
- A key shows only once, when it is made or replaced. Keep it somewhere safe.