Skip to content

Connection strings

A connection string gives an app access to one database:

drivedb://kid_7f3k2m9qx4b8w1zt:sk_Q2x…@your-app-domain/f32bf3kwsrxt9dpg
└──── key id ────┘ └ secret ┘ └── host ──┘ └─ database ─┘
  • The SDK takes the whole string.
  • Plain HTTP calls use the key part, kid_…:sk_…, as a bearer token, or as the user name and password of HTTP Basic auth.

Open the database in the app and click Connect. Each connection string has:

  • Access: Read & write, or Read only (writes are refused with ReadOnlyKey). If you can only view a shared database, you can only create read-only connection strings.
  • Expiry: never, or after 30 days, 90 days or a year.
  • A name, so you remember which app uses it, and the time it was last used.

Revoke removes access within seconds. A database can have up to 20 active connection strings; create one per app so you can revoke them separately.

Anyone with a read-write connection string can change or delete the database’s records.

  • Keep it in environment variables or a secret manager, never in code you commit or share.
  • In browsers and mobile apps, users can see everything the app contains: only use read-only connection strings there, and only for data that may be public.
  • If one leaks, revoke it and create a new one.

The secret part (sk_…) is never stored by the service. What is stored for each connection string:

  • its id, name, access, dates, and which database file it opens;
  • your Google access, encrypted with a key derived from the secret part. Without the connection string itself, this can’t be decrypted.

Google access tokens stay on the server and never reach your app. Requests are not logged with their contents.

  • You revoke it, or it expires.
  • You remove the app’s access to your Google account, or sign out with “remove access everywhere”.
  • The database file is deleted or trashed in Drive, or you lose access to a shared one (requests then fail with DatabaseUnavailable or Unauthorized).

Each case returns an error with a clear code; see Errors.

Made by Faeiz Furqan