Uses the metadata service available on GCE VMs to fetch an access token.

credentials_gce(scopes = "",
  service_account = "default", ...)



A character vector of scopes to request. Pick from those listed at

For certain token flows, the "" scope is unconditionally included. This grants permission to retrieve the email address associated with a token; gargle uses this to index cached OAuth tokens. This grants no permission to view or send email. It is considered a low value scope and does not appear on the consent screen.


Name of the GCE service account to use.


Additional arguments passed to all credential functions.


A GceToken() or NULL.

See also


if (FALSE) { credentials_gce() }