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.

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.
  • "Still meeting the conditions": friends who entered the code but have not met the game's conditions yet. A newcomer with conditions left sees what is left and a Check button.
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.
  • If you set invite qualification conditions, a friend counts only once they meet them. Until then everything waits: the +1 and leaderboard points for the inviter, the reward ladder, the newcomer's gift and the share of the friend's spending. There is no deadline.
  • Conditions are checked when the friend signs in, opens the invite screen, deposits tokens or presses Check.

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.
  • Optionally turn on Invite qualification: a friend counts once they meet ANY group, and a group needs ALL of its conditions. Conditions: not a guest, account age, sessions, days or minutes in the app, audience (level, premium, country, tutorial), a finished quest, a linked wallet, tokens deposited or held.
  • "Holds tokens" on the wallet takes the balance from the token check at sign-in (Blockchain → login mode). Turn that check on for the same token, otherwise the dashboard will not save the condition.

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.
  • While a friend waits, getUserState() returns QualificationPending and what is left in Qualification; client.referral.checkQualification() checks right away. After sign-in the SDK checks by itself, only for a player who waits.

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.

Why does an invited friend not count yet?

The game has invite qualification conditions: the friend counts once they meet them, and until then is shown under "Still meeting the conditions".

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.