Skip to content

Fetching credentials

Load an existing token or obtain a new one

token_fetch()
Fetch a token for the given scopes
credentials_app_default()
Load Application Default Credentials
credentials_byo_oauth2()
Load a user-provided token
credentials_external_account()
Get a token for an external account
credentials_gce()
Get a token for Google Compute Engine
credentials_service_account()
Load a service account token
credentials_user_oauth2()
Get an OAuth token for a user
gargle_oauth_sitrep()
OAuth token situation report
cred_funs_list() cred_funs_add() cred_funs_set() cred_funs_clear() cred_funs_set_default()
Credential function registry
oauth_app_from_json()
Create an OAuth app from JSON
token_userinfo() token_email() token_tokeninfo()
Get info from a token

Requests and responses

Helpers for forming HTTP requests and processing the response

request_develop() request_build()
Build a Google API request
request_make()
Make a Google API request
request_retry()
Make a Google API request, repeatedly
response_process() response_as_json() gargle_error_message()
Process a Google API response
field_mask()
Generate a field mask

Classes

Classes to represent a token or auth state and their constructors

Gargle-class Gargle2.0
OAuth2 token objects specific to Google APIs
gargle2.0_token()
Generate a gargle token
AuthState-class AuthState
Authorization state
init_AuthState()
Create an AuthState

Options

Demo assets

Assets to aid experimentation during development (not for production use!)

gargle_api_key()
API key for demonstration purposes