getUser

Gets user based on the provided query parameters. This function is only available on the server (a secret key is required in the client).

Example

import { getUser } from "thirdweb/wallets";
const user = await getUser({
client,
walletAddress: "0x123...",
});
function getUser(options: {
client: ThirdwebClient;
ecosystem?: Ecosystem;
email?: string;
externalWalletAddress?: string;
id?: string;
phone?: string;
walletAddress?: string;
}): Promise<GetUserResult | null>;

Parameters

The options for the get user function.

Type

let options: {
client: ThirdwebClient;
ecosystem?: Ecosystem;
email?: string;
externalWalletAddress?: string;
id?: string;
phone?: string;
walletAddress?: string;
};

Returns

let returnType: {
createdAt: string;
email?: string;
phone?: string;
profiles: Array<Profile>;
userId: string;
walletAddress: string;
};

A user object or null if not found.