Managed secret providers
Turso
Connect Turso to Alter Vault for secure API access
Overview
Section titled “Overview”Use Turso credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Provider ID | turso |
| Category | Database |
| Credential Type | Database Auth Token |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”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.
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”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.
Using in Code
Section titled “Using in Code”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.