Turnkey home page
Search...
⌘K
Ask AI
Demo
Login
Get started
Get started
Search...
Navigation
SDK reference
fetchUser()
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
fetchUser()
Copy page
Copy page
Package:
react-wallet-kit
Overview
Fetches the user details for the current session or a specified user.
Retrieves user details from the Turnkey API using the provided userId and organizationId, or defaults to those from the active session.
If no userId is provided, the userId from the current session is used.
If no organizationId is provided, the organizationId from the current session is used.
Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
Ensures that an active session exists before making the request.
Parameters
params
object
Show params details
params.
organizationId
string
organization ID to specify the sub-organization (defaults to the current session’s organizationId).
params.
stampWith
StamperType
parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
params.
userId
string
user ID to fetch specific user details (defaults to the current session’s userId).
Response
A successful response returns the following fields:
returns
v1User
required
A promise that resolves to a
v1User
object containing the user details.
Was this page helpful?
Yes
No
exportWalletAccount()
fetchWalletAccounts()
Assistant
Responses are generated using AI and may contain mistakes.