TypeScript SDK

LENS.getFullProfile

Return the profile data with Lens handle and optional join date

In Lens Protocol, each profile is associated with an ERC721 token, thus, the tokenId represent profileId and the 2 terms can be used interchangeably

Example

import { getFullProfile } from "thirdweb/extension/lens";
const profileId = 10000n; // profileId is the tokenId of the NFT
const lensProfile = await getFullProfile({ profileId, client });
function getFullProfile(
): Promise<FullProfileResponse>;

Parameters

Type

let options: {
client: ThirdwebClient;
includeJoinDate?: boolean;
overrides?: {
chain?: Chain;
lensHandleAddress?: string;
lensHubAddress?: string;
tokenHandleRegistryAddress?: string;
};
profileId: bigint;
};

Returns

let returnType: {
handle: string;
joinDate: bigint | null;
profileData: LensProfileSchema | null;
} | null;