Package: react-wallet-kit

Overview

Updates the user’s phone number.
  • This function updates the user’s phone number and, if provided, verifies it using a verification token (from an OTP flow).
  • If a userId is provided, it updates the phone number for that specific user; otherwise, it uses the current session’s userId.
  • If a verificationToken is not provided, the phone number 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.

Parameters

params
object
required

Response

A successful response returns the following fields:
returns
string
required
A promise that resolves to the userId of the updated user.