if (FALSE) {
## load/refresh existing credentials, if available
## otherwise, go to browser for authentication and authorization
gm_auth()
## force use of a token associated with a specific email
gm_auth(email = "[email protected]")
## force a menu where you can choose from existing tokens or
## choose to get a new one
gm_auth(email = NA)
## use a 'read only' scope, so it's impossible to change data
gm_auth(
scopes = "https://www.googleapis.com/auth/gmail.readonly"
)
## use a service account token
gm_auth(path = "foofy-83ee9e7c9c48.json")
}
Run the code above in your browser using DataLab