GoogleMaps API KEY for testing

Skizo-ozᴉʞS picture Skizo-ozᴉʞS · Sep 9, 2018 · Viewed 124.9k times · Source

I'd like to add an API_KEY for GoogleMaps for testing and in documentation I've read this :

Tip: During development and testing, you can register a project for testing purposes in the Google Cloud Platform Console and use a generic, unrestricted API key. When you are ready to move your app into production, register a separate project for production, create an Android-restricted API key, and add the key to your application.

My question is, do I have to put my Credit card even if it's a testing API_KEY? I do not get the purpose to put my Creadit card to use Google Maps, isn't it free?

Answer

Mashiur picture Mashiur · May 19, 2019

There seems no way to have google maps api key free without credit card. To test the functionality of google map you can use it while leaving the api key field "EMPTY". It will show a message saying "For Development Purpose Only". And that way you can test google map functionality without putting billing information for google map api key.

<script src="https://maps.googleapis.com/maps/api/js?key=&callback=initMap" async defer></script>