Docs · 06
Rich presence
A few keys that say what the game is doing, shown to friends in the app and in the overlay, and the join string that lets a friend follow.
3 min readUpdated 4 Oct 2026
Documentation sections
Rich presence and invites work end to end today: friends see the line in the app, on the website and in the overlay, and Join starts the game. Localised status templates are set on your app in the developer portal, under SDK.
What friends see
Your game sets a few key and value pairs. Gameway shows a line of text built from them under the player's name ("Competitive · Kasbah · Round 14"), a second line with the party ("2/5 in party") or how long they have been playing, and, when the player allows it, a Join button. Updates are throttled to about one a second per player, so set a key when it changes, not every frame.
Keys and limits
- At most 20 keys, a key up to 64 bytes and a value up to 256 bytes, 4 KB in all.
- Setting a key to
nullremoves it.ClearRichPresence()removes them all. - Everything is plain text. Anything a friend sees is shown as text, never as markup.
Use these conventional keys so the app can show them well; any other keys are yours and are readable by your own game on a friend's presence with GetFriendRichPresence.
| Key | Meaning |
|---|---|
status | What the player is doing, as a short key you define: menus, in_match, warmup. |
party, party_max | How many are in the player's group and how many fit. |
match_state | menus, in_match or between_rounds. The app uses it to hold back heavy work while a match is on. |
map, mode, score | Anything that makes the line more useful; shown through your status template. |
Localised status templates (your own wording for each status, in the viewer's language) are set on your app in the developer portal, under SDK, with a preview. Without a template, friends see the raw values.
Set it from your game
using Gameway.Sdk;
using GW = Gameway.Sdk.Gameway;
// when the player enters a match
GW.SetRichPresence("status", "in_match");
GW.SetRichPresence("map", "Kasbah");
GW.SetRichPresence("party", "2");
GW.SetRichPresence("party_max", "5");
GW.SetRichPresence("match_state", "in_match");
// friends may join; the connect string is shown only to a friend who asks or is invited
GW.SetJoinable(true, "203.0.113.5:27777;sid=7;pw=hunter2");
// when the player is back in the menus
GW.SetRichPresence("status", "menus");
GW.SetRichPresence("match_state", "menus");
GW.SetJoinable(false, null);
// on quit: leave no stale status behind
GW.ClearRichPresence();SetJoinable(true, connect) tells friends they can join. connect is up to 1 KB and is never part of the visible presence: only a friend who asks to join, or whom the player invites, receives it. The recommended shape is host:port;sid=<server id>;pw=<password>, and ParseConnect reads it for you.
When a friend joins
A friend joins from the player's presence (a Join button, or Ask to join when the player wants to approve each one) or from an invite the player sends. The app takes care of the rest: it checks that the friend owns the game and has the right version and branch, installs or updates if needed, and starts your game with a join string. Your game receives it and connects.
// the game was started to join a friend
string connect;
if (GW.GetLaunchJoinString(out connect) == GwResult.Ok) TryJoin(connect);
// the game is already running: a friend accepted your invite, or the player chose "join" in the app
GW.JoinRequested += e => TryJoin(e.Text); // e.Text is untrusted text from another player
void TryJoin(string connect)
{
GwConnectInfo info;
if (GW.ParseConnect(connect, out info) != GwResult.Ok) return; // strict parser: anything odd is refused
// connect to the host and port in info; ask for a ticket for the server id it carries
}- If the friend is already in your game, you get
JoinRequestedwhile it is running. Ask before leaving a match: that screen is yours. - Request a launch ticket for the server the connect string names, then connect. See Online passes.
- Invites expire after about ten minutes; a failed join shows the friend a reason (server full, session ended, invite expired).
Never put a secret in a key. A password goes only in the join string, which is shown to the friend who is joining and nobody else.
Gameway · 2026-10-04