Credentials and configuration

Credentials in Ropendal are passed explicitly through auth = to make visibility and testability straightforward.

S3-compatible examples

fs <- opendal(
  "s3",
  endpoint = "https://s3.amazonaws.com",
  bucket = "my-bucket",
  region = "us-east-1",
  auth = credentials_s3(
    access_key_id = "AKIA...",
    secret_access_key = "secret..."
  )
)

Google Drive

gdrive_fs <- opendal(
  "gdrive",
  root = "Projects",
  auth = credentials_gdrive(access_token = "ya29...", refresh_token = "....")
)

Azure Blob / GCS helpers

fs_gcs <- opendal(
  "gcs",
  bucket = "my-gcs-bucket",
  auth = credentials_gcs(token = "ya29...")
)

fs_az <- opendal(
  "azblob",
  container = "my-container",
  auth = credentials_azblob(account_name = "acct", account_key = "key...")
)

Use credentials_gdrive3() when you already use gdrive JSON token files.

fs_gdrive3 <- opendal(
  "gdrive",
  root = "Ropendal",
  auth = credentials_gdrive3(
    secret_json = "/path/secret.json",
    tokens_json = "/path/tokens.json"
  )
)