apiKey <- Sys.getenv("GOOGLE_API_KEY")
if (!is.na(apiKey) && nchar(apiKey)>0) {
authenticate(apiKey=apiKey)
}
## Not run:
# authenticate(file="clientSecrets.json")
# authenticate(file="clientSecrets.json", invokeBrowser=FALSE)
# authenticate(clientId="abc", clientSecret="xyz", invokeBrowser=FALSE)
# ## End(Not run)
Run the code above in your browser using DataLab