gs_webapp_get_token: Exchange authorization code for an access token

Description Usage Arguments See Also

Description

Exchange the authorization code in the URL returned by gs_webapp_auth_url to get an access_token. This function plays a role similar to gs_auth, but in a Shiny-based workflow: it stores a token object in an internal environment, where it can be retrieved for making calls to the Google Sheets and Drive APIs. Read the documentation for gs_webapp_auth_url for more details on OAuth2 within Shiny.

Usage

1
2
3
4
gs_webapp_get_token(auth_code,
  client_id = getOption("googlesheets.webapp.client_id"),
  client_secret = getOption("googlesheets.webapp.client_secret"),
  redirect_uri = getOption("googlesheets.webapp.redirect_uri"))

Arguments

auth_code

authorization code returned by Google that appears in URL

client_id

client id obtained from Google Developers Console

client_secret

client secret obtained from Google Developers Console

redirect_uri

where the response is sent, should be one of the redirect_uri values listed for the project in Google's Developer Console, must match exactly as listed including any trailing '/'

See Also

gs_webapp_auth_url


googlesheets documentation built on May 2, 2019, 1:57 p.m.