update
Updates the current user's profile. Calls the PUT /sdk/v1/users/me endpoint. Requires an active session.
Kotlin:
StytchConsumer.user.update(
UpdateMeParameters(
name = ApiUserV1Name(firstName = "Jane", lastName = "Doe"),
)
)Content copied to clipboard
iOS:
let name = ApiUserV1Name(firstName: "Jane", lastName: "Doe")
let params = UpdateMeParameters(name: name)
let response = try await StytchConsumer.user.update(params)Content copied to clipboard
React Native:
StytchConsumer.user.update({ name: { firstName: "Jane", lastName: "Doe" } })Content copied to clipboard
Return
UpdateMeResponse containing the updated user object.
Parameters
request
IUpdateMeParameters
name?— Updated name fields (firstName,middleName,lastName).emails?— List of email addresses to set on the user.phoneNumbers?— List of phone numbers to set on the user.cryptoWallets?— List of crypto wallet addresses to set on the user.trustedMetadata?— Key-value metadata set by your backend (requires server-side auth to modify).untrustedMetadata?— Key-value metadata that can be set by the client.
Throws
StytchError
if the request fails or no active session exists.
if the coroutine is cancelled.