getProfileMetadata

Download user lens profile from Arweave This method does NOT give you the user handle & join-time - consider using getFullProfileData instead It is useful & cost efficient if you only want to get user's name, bio, picture, coverPicture etc.

Example

import { getProfileMetadata } from "thirdweb/extensions/lens";
const profileData = await getProfileMetadata({ profileId, client });
if (profileData) {
console.log("Display name: ", profileData.lens.name);
console.log("Bio: ", profileData.lens.bio);
}
function getProfileMetadata(
): Promise<LensProfileSchema | null>;

Parameters

Type

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

Returns

let returnType: {
lens: {
appId?: string;
attributes: Array<MetadataAttribute>;
bio: string;
coverPicture: string;
id: string;
name: string;
picture: string;
};
signature: string;
};

LensProfileSchema | null