Avatar SDK
How to access .vrm avatar assets for authenticated users.
Getting Started
// If authenticated, you will receive a token, otherwise 'undefined'
const accessToken = (await globalThis.viverseClient.getToken()) as string | undefiend;
// initialize avatar client instance
globalThis.avatarClient = new globalThis.viverse.avatar({
baseURL: 'https://sdk-api.viverse.com/', // VIVERSE API domain
token: accessToken, // required to query user-specific data
});{ id: string | number; isPrivate: boolean; vrmUrl: string; headIconUrl: string; snapshot: string; createTime: number; updateTime: number; }{ name: string; activeAvatar: Avatar | null; }
API Reference
new viverse.avatar(options)
new viverse.avatar(options)Parameter
Type
Description
Required
Avatar Object
Property
Type
Description
getActiveAvatar()
getActiveAvatar()getAvatarList()
getAvatarList()getProfile()
getProfile()Property
Type
Description
getPublicAvatarList()
getPublicAvatarList()getPublicAvatarById(id)
getPublicAvatarById(id)Parameter
Type
Description
Required
getAvatarFileWithSDK(url)
getAvatarFileWithSDK(url)Parameter
Type
Description
Required
Last updated
Was this helpful?