Package: gargle 1.6.1.9000

Jennifer Bryan

gargle: Utilities for Working with Google APIs

Provides utilities for working with Google APIs <https://developers.google.com/apis-explorer>. This includes functions and classes for handling common credential types and for preparing, executing, and processing HTTP requests.

Authors:Jennifer Bryan [aut, cre], Craig Citro [aut], Hadley Wickham [aut], Google Inc [cph], Posit Software, PBC [cph, fnd]

gargle_1.6.1.9000.tar.gz
gargle_1.6.1.9000.zip(r-4.7)gargle_1.6.1.9000.zip(r-4.6)gargle_1.6.1.9000.zip(r-4.5)
gargle_1.6.1.9000.tgz(r-4.6-any)gargle_1.6.1.9000.tgz(r-4.5-any)
gargle_1.6.1.9000.tar.gz(r-4.7-any)gargle_1.6.1.9000.tar.gz(r-4.6-any)
gargle_1.6.1.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
gargle/json (API)

# Install 'gargle' in R:
install.packages('gargle', repos = c('https://r-lib.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/r-lib/gargle/issues

Pkgdown/docs site:https://gargle.r-lib.org

On CRAN:

Conda:

authenticationgoogle

16.22 score 113 stars 200 packages 690 scripts 383k downloads 63 exports 15 dependencies

Last updated from:27b2c3ac73. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK202
source / vignettesOK168
linux-release-x86_64OK156
macos-release-arm64OK121
macos-oldrel-arm64OK142
windows-develOK128
windows-releaseOK113
windows-oldrelOK102
wasm-releaseOK145

Exports:AuthStatebulletizecheck_is_service_accountcred_funs_addcred_funs_clearcred_funs_listcred_funs_list_defaultcred_funs_setcred_funs_set_defaultcredentials_app_defaultcredentials_byo_oauth2credentials_external_accountcredentials_gcecredentials_service_accountcredentials_user_oauth2field_maskgargle_api_keygargle_appgargle_clientgargle_error_messagegargle_last_contentgargle_last_responsegargle_map_cligargle_oauth_cachegargle_oauth_clientgargle_oauth_client_from_jsongargle_oauth_client_typegargle_oauth_emailgargle_oauth_sitrepgargle_oob_defaultgargle_verbosityGargle2.0gargle2.0_tokengce_access_tokengce_instance_service_accountsGceTokeninit_AuthStatelocal_cred_funslocal_gargle_verbosityoauth_app_from_jsonoauth_external_tokenrequest_buildrequest_developrequest_makerequest_retryresponse_as_jsonresponse_processsecret_decrypt_jsonsecret_encrypt_jsonsecret_has_keysecret_make_keysecret_read_rdssecret_write_rdstidyverse_api_keytidyverse_apptidyverse_clienttoken_emailtoken_fetchtoken_tokeninfotoken_userinfoWifTokenwith_cred_funswith_gargle_verbosity

Dependencies:askpassclicurlfsgluehttrjsonlitelifecyclemimeopensslR6rappdirsrlangsyswithr

Troubleshooting gargle auth
"gargle_verbosity" option | gargle_oauth_sitrep() | Why do good tokens go bad? | Too many tokens | Credential rolling | How to avoid auth pain | How to inspect the last response

Last update: 2026-01-28
Started: 2020-05-01

Auth when using R from the browser
Consider using a service account token (or no token!) | When and how to use OOB | Request OOB auth in the PKG_auth() call | Set the "gargle_oob_default" option | Conventional vs. pseudo-OOB auth | How pseudo-OOB works | More details about the deprecation of conventional OOB | But I didn't need OOB yesterday! | Further reading

Last update: 2026-01-28
Started: 2019-08-16

How gargle gets tokens
token_fetch() | Get verbose output | credentials_byo_oauth2() | credentials_service_account() | credentials_external_account() | credentials_app_default() | credentials_gce() | credentials_user_oauth2() | Manipulate the credential function registry

Last update: 2026-01-28
Started: 2019-04-18

How to get your own API credentials
Get a Google Cloud Platform project | Enable API(s) | Think about billing | API Key | What does a user do with an API key? | OAuth client ID and secret | What does a user do with an OAuth client? | Service account token | What does a user do with a service account token? | Workload identity federation | Further reading

Last update: 2026-01-28
Started: 2019-06-11

How to use gargle for auth in a client package
Key choices | User-facing auth | Auth state | OAuth client | API key | Email or Google identity | Scopes | OAuth cache and Out-of-band auth | Overview of mechanics | Getting that first token | Auth interface | De-auth | Bring Your Own Client and Key | Changing identities (and more)

Last update: 2026-01-28
Started: 2019-01-30

Request helper functions
Why use gargle's request helpers? | High-level design pattern | gargle's HTTP request helpers | Discovery Documents | Method (or endpoint) data | Design suggestion: forming requests | Design suggestion: making requests | Reference

Last update: 2026-01-28
Started: 2019-02-25

Transition from OAuth app to OAuth client
Why change was needed | How to instantiate an OAuth client in R | AuthState class | Gargle2.0 class

Last update: 2026-01-28
Started: 2023-05-24

Non-interactive auth
Provide a token or pre-authorize token discovery | Sidebar 1: Deployment | Sidebar 2: I just want my .Rmd to render | Embrace credentials available in certain cloud settings | Google Compute Engine | Workload Identity on Google Kubernetes Engine (GKE) | AWS | Provide a service account token directly | Rig a service or external account for use with Application Default Credentials | Provide an OAuth token directly | Arrange for an OAuth user token to be re-discovered | I just want my .Rmd to render | Project-level OAuth cache

Last update: 2026-01-28
Started: 2019-07-01

Readme and manuals

Help Manual

Help pageTopics
Authorization stateAuthState AuthState-class
Credential function registrycred_funs cred_funs_add cred_funs_clear cred_funs_list cred_funs_list_default cred_funs_set cred_funs_set_default local_cred_funs with_cred_funs
Load Application Default Credentialscredentials_app_default
Load a user-provided tokencredentials_byo_oauth2
Get a token for an external accountcredentials_external_account
Get a token from the Google metadata servercredentials_gce
Load a service account tokencredentials_service_account
Get an OAuth token for a usercredentials_user_oauth2
Generate a field maskfield_mask
Create an OAuth client for Googlegargle_oauth_client gargle_oauth_client_from_json
OAuth token situation reportgargle_oauth_sitrep
Options consulted by garglegargle_oauth_cache gargle_oauth_client_type gargle_oauth_email gargle_oob_default gargle_options gargle_verbosity local_gargle_verbosity with_gargle_verbosity
Encrypt/decrypt JSON or an R objectgargle_secret secret_decrypt_json secret_encrypt_json secret_has_key secret_make_key secret_read_rds secret_write_rds
Generate a gargle tokengargle2.0_token
List all service accounts available on this GCE instancegce_instance_service_accounts
Create an AuthStateinit_AuthState
Build a Google API requestrequest_build request_develop
Make a Google API requestrequest_make
Make a Google API request, repeatedlyrequest_retry
Process a Google API responsegargle_error_message response_as_json response_process
Fetch a token for the given scopestoken_fetch
Get info from a tokentoken-info token_email token_tokeninfo token_userinfo