gm_scopes: Produce scopes specific to the Gmail API

View source: R/gm_auth.R

gm_scopesR Documentation

Produce scopes specific to the Gmail API

Description

When called with no arguments, gm_scopes() returns a named character vector of scopes associated with the Gmail API. If gm_scopes(scopes =) is given, an abbreviated entry such as "gmail.readonly" is expanded to a full scope ("https://www.googleapis.com/auth/gmail.readonly" in this case). Unrecognized scopes are passed through unchanged.

Usage

gm_scopes(scopes = NULL)

Arguments

scopes

One or more API scopes. Each scope can be specified in full or, for Gmail API-specific scopes, in an abbreviated form that is recognized by gm_scopes():

  • "full" = "https://mail.google.com/" (the default)

  • "gmail.compose" = "https://www.googleapis.com/auth/gmail.compose"

  • "gmail.readonly" = "https://www.googleapis.com/auth/gmail.readonly"

  • "gmail.labels" = "https://www.googleapis.com/auth/gmail.labels"

  • "gmail.send" = "https://www.googleapis.com/auth/gmail.send"

  • "gmail.insert" = "https://www.googleapis.com/auth/gmail.insert"

  • "gmail.modify" = "https://www.googleapis.com/auth/gmail.modify"

  • "gmail.metadata" = "https://www.googleapis.com/auth/gmail.metadata"

  • "gmail.settings_basic" = "https://www.googleapis.com/auth/gmail.settings.basic"

  • "gmail.settings_sharing" = "https://www.googleapis.com/auth/gmail.settings.sharing"

See https://developers.google.com/gmail/api/auth/scopes for details on the permissions for each scope.

Value

A character vector of scopes.

See Also

https://developers.google.com/gmail/api/auth/scopes for details on the permissions for each scope.

Other auth functions: gm_auth_configure(), gm_auth(), gm_deauth(), gmailr-configuration

Examples

gm_scopes("full")
gm_scopes("gmail.readonly")
gm_scopes()

r-lib/gmailr documentation built on Nov. 5, 2023, 6:22 a.m.