Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerkstage.dev

getSession()

Retrieves a single session by its ID, if the ID is valid. Throws an error otherwise.

const sessionId = 'my-session-id'; const session = await clerkClient.sessions.getSession(sessionId);

Required parameters

NameTypeDescription
sessionIdstringThe ID of the session to retrieve.

What did you think of this content?

Clerk © 2024