SessionService
Joining games: sessions, heartbeats, presence in a session and invites.
On this page
- Summary
- Methods
- Join
- Leave
- Heartbeat
- ListSessions
- GetSession
- InviteToSession
- Types
- GetSessionRequest
- HeartbeatRequest
- HeartbeatResponse
- InviteToSessionRequest
- InviteToSessionResponse
- JoinRequest
- JoinResponse
- LeaveRequest
- LeaveResponse
- ListSessionsRequest
- ListSessionsResponse
- SessionDetail
- SessionInfo
- SessionMember
- See also
Joining games. Every method is a POST with a JSON body; see the overview for the protocol, authentication and errors.
Summary#
| Method | Auth | Description |
|---|---|---|
| Join | Account or guest | |
| Leave | Account or guest | |
| Heartbeat | Account or guest | |
| ListSessions | Optional | |
| GetSession | Account or guest | The live roster of one session. Changes also arrive over realtime as {"type":"session_members","sessionId","members":[...]} to everyone in the session. |
| InviteToSession | Account | Invites a friend into the caller's session: they get a realtime {"type":"game_invite","from","experienceId","sessionId","title"} and may join it directly. |
Methods#
Join#
POST /neo.platform.v1.SessionService/Join
Content-Type: application/jsonAuth: A signed-in account or a guest.
Request: JoinRequest. Response: JoinResponse.
Leave#
POST /neo.platform.v1.SessionService/Leave
Content-Type: application/jsonAuth: A signed-in account or a guest.
Request: LeaveRequest. Response: LeaveResponse.
Heartbeat#
POST /neo.platform.v1.SessionService/Heartbeat
Content-Type: application/jsonAuth: A signed-in account or a guest.
Request: HeartbeatRequest. Response: HeartbeatResponse.
ListSessions#
POST /neo.platform.v1.SessionService/ListSessions
Content-Type: application/jsonAuth: Optional. Signed-in callers get personalised fields.
Request: ListSessionsRequest. Response: ListSessionsResponse.
GetSession#
The live roster of one session. Changes also arrive over realtime as {"type":"session_members","sessionId","members":[...]} to everyone in the session.
POST /neo.platform.v1.SessionService/GetSession
Content-Type: application/jsonAuth: A signed-in account or a guest.
Request: GetSessionRequest. Response: SessionDetail.
InviteToSession#
Invites a friend into the caller's session: they get a realtime {"type":"game_invite","from","experienceId","sessionId","title"} and may join it directly.
POST /neo.platform.v1.SessionService/InviteToSession
Content-Type: application/jsonAuth: A signed-in account. Guests are refused.
Request: InviteToSessionRequest. Response: InviteToSessionResponse.
Types#
GetSessionRequest#
| Field | Type | Description |
|---|---|---|
sessionId | string |
HeartbeatRequest#
| Field | Type | Description |
|---|---|---|
sessionId | string |
HeartbeatResponse#
| Field | Type | Description |
|---|---|---|
memberCount | string (int64) |
InviteToSessionRequest#
| Field | Type | Description |
|---|---|---|
sessionId | string | |
userId | string |
InviteToSessionResponse#
No fields: send {}.
JoinRequest#
| Field | Type | Description |
|---|---|---|
experienceId | string | |
sessionId | string | Join a specific session (a friend's); empty = matchmake. |
platform | string | Platform of the client, for example web, macos, windows, linux, ios or android. |
engineVersion | string |
JoinResponse#
| Field | Type | Description |
|---|---|---|
sessionId | string | |
gameToken | string | Ed25519 JWT scoped to this session. |
hostingTier | string | solo, peer, edge, dedicated |
hostUserId | string | For peer sessions: the host's user id (the caller when it is the host). |
connectUrl | string | Signalling / server address, depending on the tier. |
contentUrl | string | Content manifest for the caller's cook target. |
placeVersionId | string | |
members | array of UserSummary |
LeaveRequest#
| Field | Type | Description |
|---|---|---|
sessionId | string |
LeaveResponse#
No fields: send {}.
ListSessionsRequest#
| Field | Type | Description |
|---|---|---|
experienceId | string |
ListSessionsResponse#
| Field | Type | Description |
|---|---|---|
sessions | array of SessionInfo |
SessionDetail#
| Field | Type | Description |
|---|---|---|
id | string | |
experienceId | string | |
hostingTier | string | |
maxPlayers | number | |
members | array of SessionMember |
SessionInfo#
| Field | Type | Description |
|---|---|---|
id | string | |
memberCount | string (int64) | |
maxPlayers | number | |
friends | array of UserSummary |
SessionMember#
| Field | Type | Description |
|---|---|---|
user | UserSummary | |
joinedAt | string | |
isHost | boolean | |
isFriend | boolean | |
guest | boolean |