If you are using the API key, you'll have to enable the Geocoding API as well. This API is required to convert any plain text location into a pair of coordinates, for example "New York, NY, USA" will translate to "40.712784,-74.005941".
Enabling it is very simply, it only requires a couple of clicks:
Create a project and retrieve the API key as shown in the previous chapter
While you are inside the Console API, navigate to into the Library page
Click on the Google Maps Geocoding API
Click on the Enable button
Congratulations! You're done!