Here is the code. It is basic call to the Google Maps Platform. The actual key value has been replaced with "xxxx". The API key value was copied directly from my Google Maps Platform credentials area.
library(rstudioapi)
library(ggmap)
register_google(key = "xxxx", write = TRUE)
election_map <- ggmap(get_googlemap(center = c(lon = 80.91, lat = 33.82)))
## Here is the error message returned
Error in get_googlemap(center = c(lon = 80.91, lat = 33.82)) :
HTTP 400 Bad Request
The Google Maps Platform server rejected your request. The provided API key is invalid.