triggair
Guides

Social & teams

Friends, share/invite links, and teams (clans) with roles, invites, and requests.

Friends are a request → accept state machine. Blocking is one-directional and hides a player. Friends power the friends-only leaderboard view.

await tg.social.request(otherPlayerId);
const friends = await tg.social.friends();

Share & invite links

Mint a short code carrying an opaque context blob (a level to try, a referral, a challenge). Resolve it on the recipient's device to read the context — the basis for viral invites and deep links.

const { code } = await tg.social.share({ level: 7 });
const ctx = await tg.social.resolveShare(code);

Teams / clans

Teams have an owner, roles (owner/admin/member), and a privacy mode (open, closed, invite-only). Open teams are joined directly; closed teams use a request → approve flow; invite-only teams use invites. Admins can kick, ban, and change roles; the owner can transfer ownership or disband. Teams get their own leaderboards and a shared team storage scope.

← All guides · API reference