How to add my Api key into get_map() function?

I'm trying to add my api key into get_map function, because otherwise it will occur "HTTP status was '403 Forbidden'" error. I tried to assign api_key <- 'my api key' , but seems it doesn't work....

Here is my mapping code:

Dayton.map <- ggmap(get_map("Dayton",
zoom = 13, scale = "auto",
maptype = "satellite",
source = "google",
api_key),
extent="device",
legend="topright")

2 posts were merged into an existing topic: How to add my Api key into get_map()?