I am trying to create a map file with ggmap but there is this persistent error of Forbidden (HTTP 403). I am using an API key, but that doesn't seem to work either.
Here is the code:
library(ggplot2)
library(ggmap)
set_key("...API-key...")
dm <- get_map(location="Spain", zoom=6)
Then this is the message I receive:
Error in get_googlemap(center = location, zoom = zoom, maptype = maptype, : Forbidden (HTTP 403).
The code used to work at home, but now I'm living on campus. Could IP address affect this too?
SOLVED I had already got an API key. However, as has been pointed out by @Roman, I need a billing-enabled account to make it work. It didn't cost money, but you do need to give your credit card.