Turnkey home page
Search...
⌘K
Ask AI
Demo
Login
Get started
Get started
Search...
Navigation
SDK reference
getAllSessions()
Documentation
SDK reference
API reference
Security
Changelogs
Support
Blog
Contact us
SDK reference
Introduction
React
React Native
Flutter
Swift
TypeScript | Frontend
Overview
Getting Started
Authentication
Advanced backend authentication
Advanced API requests
Legacy (@turnkey/sdk-browser)
SDK reference
addOauthProvider()
addPasskey()
clearAllSessions()
clearSession()
clearUnusedKeyPairs()
completeOauth()
completeOtp()
connectWalletAccount()
constructor()
createApiKeyPair()
createPasskey()
createWallet()
createWalletAccounts()
deleteSubOrganization()
disconnectWalletAccount()
exportPrivateKey()
exportWallet()
exportWalletAccount()
fetchUser()
fetchWalletAccounts()
fetchWallets()
getActiveSessionKey()
getAllSessions()
getProxyAuthConfig()
getSession()
getWalletProviders()
importPrivateKey()
importWallet()
init()
initOtp()
loginOrSignupWithWallet()
loginWithOauth()
loginWithOtp()
loginWithPasskey()
loginWithWallet()
logout()
refreshSession()
removeOauthProviders()
removePasskeys()
removeUserEmail()
removeUserPhoneNumber()
setActiveSession()
signAndSendTransaction()
signMessage()
signTransaction()
signUpWithOauth()
signUpWithOtp()
signUpWithPasskey()
signUpWithWallet()
storeSession()
switchWalletProviderChain()
updateUserEmail()
updateUserName()
updateUserPhoneNumber()
verifyOtp()
switchWalletAccountChain()
fetchPrivateKeys()
TypeScript | Server
Golang
Rust
Ruby
CLI
Python
Web3 libraries
Advanced
Migration Path
SDK reference
getAllSessions()
Copy page
Copy page
Overview
Retrieves all sessions stored in persistent storage.
This function fetches all session objects currently stored by the client, including those that are not active.
Returns a record mapping each session key to its corresponding
Session
object.
Useful for session management, auditing, or displaying all available sessions to the user.
Automatically skips any session keys that do not have a valid session object.
Package:
core
Defined in:
core.ts:3755
Parameters
No parameters.
Response
A successful response returns the following fields:
returns
undefined | Record<string, Session>
required
A promise that resolves to a record of session keys and their corresponding
Session
objects, or
undefined
if no sessions exist.
Was this page helpful?
Yes
No
getActiveSessionKey()
getProxyAuthConfig()
Assistant
Responses are generated using AI and may contain mistakes.