R: Error in get_map()/get_googlemap() from ggmap

Make sure to enable billing. You don't have to restrict api, but make sure all the api's you need are enabled. if you want to search location names, you'll need geocoding api in addition to static maps. ggmap from CRAN is OK now (don't need github version).


This error is due to the google key not having the appropriate API activity enabled for that key.

Go into the google API console and enable the API "Maps Static API" and it should work for you.

EDIT: Jan 2020 - I was doing some similar work and found that a similar API was failing because billing information had to be added to the project in the Google Cloud console before it would work.