Turnkey home page
Search...
⌘K
Ask AI
Demo
Login
Get started
Get started
Search...
Navigation
SDK reference
getActiveSessionKey()
Documentation
SDK reference
API reference
Security
Changelogs
Support
Blog
Contact us
SDK reference
Introduction
React
Overview
Getting started
Authentication
Using embedded wallets
Using external wallets
Signing
UI customization
Sub-organization customization
Advanced API requests
Advanced backend authentication
Troubleshooting
Legacy (@turnkey/sdk-react)
SDK reference
addOauthProvider()
addPasskey()
clearAllSessions()
clearSession()
clearUnusedKeyPairs()
completeOauth()
completeOtp()
connectWalletAccount()
createApiKeyPair()
createPasskey()
createWallet()
createWalletAccounts()
deleteSubOrganization()
disconnectWalletAccount()
exportPrivateKey()
exportWallet()
exportWalletAccount()
fetchUser()
fetchWalletAccounts()
fetchWallets()
getActiveSessionKey()
getAllSessions()
getProxyAuthConfig()
getSession()
getWalletProviders()
handleAddEmail()
handleAddOauthProvider()
handleAddPasskey()
handleAddPhoneNumber()
handleAppleOauth()
handleExportPrivateKey()
handleExportWallet()
handleExportWalletAccount()
handleFacebookOauth()
handleGoogleOauth()
handleImportWallet()
handleConnectExternalWallet()
handleLogin()
handleRemoveOauthProvider()
handleRemovePasskey()
handleRemoveUserEmail()
handleRemoveUserPhoneNumber()
handleSignMessage()
handleUpdateUserEmail()
handleUpdateUserName()
handleUpdateUserPhoneNumber()
importPrivateKey()
importWallet()
initOtp()
loginOrSignupWithWallet()
loginWithOauth()
loginWithOtp()
loginWithPasskey()
loginWithWallet()
logout()
refreshSession()
refreshUser()
refreshWallets()
removeOauthProviders()
removePasskeys()
removeUserEmail()
removeUserPhoneNumber()
setActiveSession()
signAndSendTransaction()
signMessage()
signTransaction()
signUpWithOauth()
signUpWithOtp()
signUpWithPasskey()
signUpWithWallet()
storeSession()
switchWalletProviderChain()
updateUserEmail()
updateUserName()
updateUserPhoneNumber()
verifyOtp()
switchWalletAccountChain()
fetchPrivateKeys()
handleDiscordOauth()
handleImportPrivateKey()
handleXOauth()
React Native
Flutter
Swift
TypeScript | Frontend
TypeScript | Server
Golang
Rust
Ruby
CLI
Python
Web3 libraries
Advanced
Migration Path
SDK reference
getActiveSessionKey()
Copy page
Copy page
Package:
react-wallet-kit
Overview
Retrieves the active session key currently set in persistent storage.
This function fetches the session key that is currently marked as active in the client’s persistent storage.
The active session key determines which session is used for all session-dependent operations.
If no active session key is set, returns
undefined
.
Useful for determining which session is currently in use, especially when managing multiple sessions.
Parameters
No parameters.
Response
A successful response returns the following fields:
returns
undefined | string
required
A promise that resolves to the active session key as a string, or
undefined
if no active session is set.
Was this page helpful?
Yes
No
fetchWallets()
getAllSessions()
Assistant
Responses are generated using AI and may contain mistakes.