Player Self-Service: /my and Personal API Tokens
Let players see their own statistics with /my in Discord or a personal API token, choose exactly which sections they see, and let every player hide from public leaderboards.
What self-service is
Self-service lets a player read their own statistics on your server: their playtime, sessions, travel, wealth, events and, if you choose, their deaths and kills. A player can never read another player's data through it. There is nothing to type a name into: every answer is for the Discord account that asked.
Players get it in two ways:
- `/my` in Discord, through your GameGrid Discord bot. Every reply is private to the player who asked. It is
/my, not/me: Discord has its own built-in/me, which takes that name, so/me statsonly posts the words in italics. - A personal API token (it starts with
gpt_), for a player who wants their own figures in their own tools. It reads only that player's data and only what you shared.
Everything starts switched off
Nothing answers until you switch it on, per server, in Metrics, Settings, Player access, under Player self-service:
- Discord /my: players may use
/myin your Discord. - Personal API tokens: players may create a token with
/my api-token create, and existing tokens work. Switching this off stops every player token on the server at once. - Sections: tick what players may see about themselves: Stats, Playtime and sessions, Travel and places, Combat (deaths and kills), Wealth and Events. A section you leave off answers "Your server's owner has not shared this."
- Allow players to post their own stats publicly: with this on, a player may add
share: Trueto post their own card in the channel. Off by default: replies stay private.
The card shows a preview: pick a linked player and see exactly the /my stats card they would see with the switches you saved. Revoke all player tokens stops every token on the server.
How a player is identified
Only a player who linked their Discord to their character can use self-service: they run /link in Discord and type the code in game, as described in Linking Discord to a Game Character. An unlinked player is told to link first. A player who has not played on the server since linking is told so.
What players can do
| Command | What it shows or does |
|---|---|
/my stats | Playtime, sessions, logins per day, rank, distance and places discovered; deaths and kills when you share Combat |
/my playtime | Playtime per day and their last 10 sessions |
/my travel | How far they travelled and the places they spend most time |
/my wealth | Their balance, coins earned and spent, and their top purchases |
/my events | The events they took part in, their placements and payouts |
/my leaderboard-hide | Hide themselves from public leaderboards, or show themselves again |
/my leaderboard-mention | Allow posted leaderboards to mention them |
/my api-token create | Create their personal API token, shown once, privately |
/my api-token revoke | Stop their token working |
Hiding from public leaderboards always works for a linked player, whatever you switched on: it is the player's choice. Your own Metrics still shows them.
Personal API tokens
A token reads the player's own data under /api/public/v1/me/ (profile, sessions, travel, places, economy, events, deaths, and public leaderboards with the player's own rank). It is shown once and never stored; GameGrid keeps only a scrambled form of it. It stops working after 90 days, when the player creates a new one, when they revoke it, when they unlink or link a different character, when you switch personal tokens off, when you revoke it, or when you forget the player. Each token is limited to 60 requests a minute, and all tokens on one server to 600.
A player token is not an API key: it cannot manage anything, read any other player, or be used with your server's API routes.
What you can see
Open a player's profile from Metrics and choose the Admin tab. Self-service access lists when they used /my or their token, and their tokens by a short id (never the token itself) with when each was created and last used. Revoke stops their tokens on this server.
What a player never sees
Another player's data or name, any address, their or anyone's country, possible other accounts, notes or moderation, or chat. Self-service answers are built from a fixed list of the player's own figures.
In the API
The bot uses two scopes, both in the Discord bot key preset: players_self:read for the five read commands and players_self:write for hiding, mentions and tokens. Neither is in the read-only preset. Player tokens use their own playerToken scheme in the API reference.