Game systems

Invite friends: codes, links and rewards

How the ready-made iDos Games invite system works - a personal invite code and link, a gift for the newcomer and a reward ladder for friends who came - and how to turn it on in the dashboard.

Updated: Русский

Invites bring new players: each player has a short code and a link to share, the newcomer gets a gift, and the inviter climbs a reward ladder for the friends who came. The system is part of every new project, but invites are off until you turn them on.

What the player sees

  • The player's own short code with "Copy" and "Share link" (the system share sheet or the clipboard).
  • How many friends came by the code and the reward ladder for them, claim one or all.
  • Entering a friend's code: shows the newcomer's gift and pays it once.
  • "You joined by a friend's code" for a player bound at sign-in by an invite link.
Invite friends
12 450
320
Your code: KD7Q-PX2M
Copy
Share link
1 friend · 200 gems
Claimed
3 friends · chest
Claim
5 friends · hero3 of 5 came
Enter a friend's code
The player's own code and invite link.
The reward ladder for friends who came; claim one or all.
A newcomer enters a friend's code and gets a gift once.
Example. The invite screen: own code, the reward ladder and entering a code.

How it works

  • The server mints the code when the screen opens; 8 letters, separators and case are ignored.
  • A newcomer who came by an invite link is bound to the inviter at sign-in by itself.
  • While invites are off, the screen says so and sends no request.

Step 01Add the system to your project

Nothing to add: the invite screen is part of every new project and always shown in the lobby.

Step 02Set it up in the dashboard

Open the dashboard, pick your project and go to Live Operations → v2 → Referral.

  • Turn invites on: they are off by default.
  • Set the newcomer's gift and the rewards for 1, 3, 5 or more friends.

The AI button on the page opens an assistant: describe what you need, it proposes changes, and you review them and press Save.

Step 03Test and release

Check the system in the test version of your app. Settings go to the live app as a separate action - see publishing and links.

For developers

Invites work through client.referral in @idosgames/core.

TypeScript
// The player's code and invite state, then a friend's code from a newcomer
await client.referral.getUserState()
const res = await client.referral.activateReferralCode('KD7QPX2M') // a whole link works too
if (!res.ok) return showError(res.error)
await client.referral.claimInviteRewardsBatch(['friends_1', 'friends_3'])
  • activateReferralCode takes a bare code or the whole link a player pasted.
  • Claim every ready reward at once with claimInviteRewardsBatch.

Every field is described in the referral-system skill, served by the SDK MCP server.

Frequently asked questions

Why does the invite screen say invites are off?

Invites are off by default. Turn them on in the Referral section of the dashboard.

Can a newcomer enter a code later?

Yes, once: the code popup pays the newcomer's gift one time.

See also

Make your own game

Describe the idea in a sentence - the AI coder builds it, and it goes live at its own link.