# Authentication

> Authentication — Turso documentation.
> Canonical HTML: https://tursodb.cn/docs/sdk/authentication/
> Upstream Source (MIT): https://docs.turso.tech/sdk/authentication
> Language: en

---
SDKs connect using the `turso://` protocol for [Turso](/docs/tursodb/quickstart/) databases and the `libsql://` protocol for [libSQL](/docs/libsql/) databases, unless using the [HTTP API](https://docs.turso.tech/sdk/http).

## Database URL

You can find your database URL using the [Turso CLI](/docs/cli/db/show/) or [Platform API](/docs/api-reference/databases/retrieve/), it looks something like this:

```bash Turso
turso://[DB-NAME]-[ORG-NAME].turso.io
```

```bash libSQL
libsql://[DB-NAME]-[ORG-NAME].turso.io
```

```bash HTTPS
https://[DB-NAME]-[ORG-NAME].turso.io
```

<div class="doc-callout doc-callout-info"><div class="doc-callout-title">NOTE</div><div class="doc-callout-body">

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.

</div></div>


## Auth Tokens

SDKs require an auth token, unless [working locally](/docs/local-development/). You can create tokens using the [Turso CLI](https://docs.turso.tech/cli) or [Platform API](https://docs.turso.tech/api-reference), or let your authentication provider issue tokens via [JWKS](/docs/sdk/authorization/#jwks-authentication-providers).

See [Authorization](/docs/sdk/authorization/) for full details on token creation, fine-grained permissions, and JWKS setup.
