Skip to content

Reference

Turso

Connect Turso to Alter Vault for secure API access

Use Turso credentials to make authenticated API calls through Alter Vault without exposing API keys in code.

PropertyValue
Provider IDturso
CategoryDatabase
Credential TypeDatabase Auth Token

Log in to the Turso Dashboard

Log in to the Turso Dashboard.

Generate a token

Open the database and click Generate Token (or run turso db tokens create <database>).

Copy the token

Choose full-access or read-only and copy the token.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Turso

Go to Managed Secrets > Add Provider > Turso.

Enter credentials

Paste your Database Auth Token into the credential field.

Save

Click Save. You’ll receive a grant_id to use with the SDK.

response = await alter_app.request(
HttpMethod.POST,
"https://YOUR-DATABASE-YOUR-ORG.turso.io/v2/pipeline",
grant_id="YOUR_GRANT_ID",
json={
"requests": [
{"type": "execute", "stmt": {"sql": "SELECT * FROM users LIMIT 5"}},
{"type": "close"},
]
},
)
  • Database tokens authorize the per-database HTTP API. Turso Platform API tokens are separate.

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
pipelineadmin, delete, read, writePOST/v2/pipeline
dumpreadGET/dump
listenreadGET/beta/listen
jobs/listreadGET/v1/jobs
jobs/getreadGET/v1/jobs/{id}
healthreadGET/health
versionreadGET/version

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.