curl -L 'https://api.turso.tech/v1/auth/validate' \
-H 'Authorization: Bearer TOKEN'
import { createClient } from "@tursodatabase/api";
const turso = createClient({
org: "...",
token: "",
});
const response = await turso.apiTokens.validate("...");
{
"exp": 999
}API Tokens
Validate API Token
Validates an API token belonging to a user.
GET
/
v1
/
auth
/
validate
curl -L 'https://api.turso.tech/v1/auth/validate' \
-H 'Authorization: Bearer TOKEN'
import { createClient } from "@tursodatabase/api";
const turso = createClient({
org: "...",
token: "",
});
const response = await turso.apiTokens.validate("...");
{
"exp": 999
}curl -L 'https://api.turso.tech/v1/auth/validate' \
-H 'Authorization: Bearer TOKEN'
import { createClient } from "@tursodatabase/api";
const turso = createClient({
org: "...",
token: "",
});
const response = await turso.apiTokens.validate("...");
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
Successful response
The time of expiration for the provided token in unix epoch seconds, or -1 if there is no expiration.
Example:
999
Was this page helpful?