Skip to main content
Multilingual TursoDB, MVCC & AI Agent database guides Read Engine Guide →
Turso Cloud SDKs

Authentication

Authentication — Turso documentation.

SDKs connect using the turso:// protocol for Turso databases and the libsql:// protocol for libSQL databases, unless using the HTTP API.

Database URL

You can find your database URL using the Turso CLI or Platform API, it looks something like this:

turso://[DB-NAME]-[ORG-NAME].turso.io
libsql://[DB-NAME]-[ORG-NAME].turso.io
https://[DB-NAME]-[ORG-NAME].turso.io
NOTE

WebSockets generally offer better performance when maintaining an open socket for multiple queries, whereas HTTP is typically more efficient for single queries due to reduced client-server round trips — it’s advisable to benchmark both to ascertain the best option for your specific needs.

Auth Tokens

SDKs require an auth token, unless working locally. You can create tokens using the Turso CLI or Platform API, or let your authentication provider issue tokens via JWKS.

See Authorization for full details on token creation, fine-grained permissions, and JWKS setup.

Synced from official Turso documentation ( tursodatabase/turso-docs · MIT License) Official Docs ↗
Search
Press Esc to close · Powered by Pagefind