I experienced the same thing but found a solution.
In the Developer Console, I received the following feedback:
This api project is not authorized to use this api
The solution:
Enable the following APIs:
– Geolocation API
– Geocoding API
– Maps Embed API
– Maps Javascript API
And of course enable billing