Turnkey home page
Search...
⌘K
Ask AI
Demo
Login
Get started
Get started
Search...
Navigation
SDK reference
updateUserEmail()
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
updateUserEmail()
Copy page
Copy page
Overview
Updates the user’s email address.
This function updates the user’s email address and, if provided, verifies it using a verification token (typically from an OTP flow).
If a userId is provided, it updates the email for that specific user; otherwise, it uses the current session’s userId.
If a verificationToken is not provided, the email will be updated but will not be marked as verified.
Automatically ensures an active session exists before making the request.
Handles session management and error reporting for both update and verification flows.
Package:
core
Defined in:
core.ts:2457
Parameters
params
object
required
Show params details
params.
email
string
required
new email address to set for the user.
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 update a specific user’s email (defaults to the current session’s userId).
params.
verificationToken
string
verification token from OTP email verification (required if verifying the email).
Response
A successful response returns the following fields:
returns
string
required
A promise that resolves to the userId of the updated user.
Was this page helpful?
Yes
No
switchWalletProviderChain()
updateUserName()
Assistant
Responses are generated using AI and may contain mistakes.