getUserPhoneNumber

Retrieves the authenticated user phone number for the active embedded wallet.

Example

import { getUserPhoneNumber } from "thirdweb/wallets/embedded";
const phoneNumber = await getUserPhoneNumber({ client });
console.log(phoneNumber);
function getUserPhoneNumber(
): Promise<undefined | string>;

Parameters

The arguments for retrieving the authenticated user.

Type

let options: { client: ThirdwebClient; ecosystem?: Ecosystem };

Returns

let returnType: Promise<undefined | string>;

The authenticated user phone number if authenticated with phone number, otherwise undefined.