🍿 @lorenzopant/tmdb

Delete Session

Invalidate a session ID to log a user out.

Invalidates an existing session ID, effectively logging the user out. After this call, the session ID can no longer be used for account operations.

async delete_session(body: AuthDeleteSessionBody): Promise<AuthDeleteSessionResponse>

TMDB Reference: Delete Session

Parameters

NameTypeRequiredDescription
session_idstringThe session ID to invalidate.

Returns

AuthDeleteSessionResponse

Errors

HTTPTMDB codeCause
4013Invalid or missing access token.
4017Invalid or already-deleted session ID.

Example

import { TMDB } from "@lorenzopant/tmdb";

const tmdb = new TMDB("your-access-token");

const { success } = await tmdb.authentication.delete_session({
	session_id: "79191836ddaa0da3df76a5ffef6f07ad6ab0c641",
});

console.log(success); // true

On this page