Skip to main content

User & Friends

The current user and friends, user context and activity, and leaderboards.

Commonly used

Guides

All APIs in this topic

Reference assets and other modules with a script input and require modules with require('LensStudio:<name>').

Components, assets, and modules

APIDescription
LeaderboardModuleEnables usage of Leaderboard API within a Lens.
UserActivityModule SPECSExposes the user's current mode of action (e.g. stationary, walking) and posture (e.g. standing, sitting) to Lens developers.

Objects and data

APIDescription
LeaderboardA leaderboard which can contain scores and information about participating users.
SafeUserRepresents a user of the current runtime with only non-sensitive information (Bitmoji info).
SnapchatFriendUserInfoDetails about friendship between the active user and another user.
SnapchatUserA User backed by a Snapchat account.
SnapData
SpecsUser SPECSA User backed by a Specs (Spectacles) account, which may or may not have a Snapchat account linked.
UserRepresents a user of the current runtime.
UserBirthdayA user's birth month and day, returned by User#birthday.
UserContextSystemProvides information about the user such as display name, birthday, and current weather.

Enums

APIDescription
AccountTypeThe kind of account backing a User.
WeatherConditionTypes of weather returned by UserContextSystem's callback.
Zodiac