CEEJAYDocs

List connect sessions

Read up to 100 connect sessions of one game by their IDs, for a server that follows several at once.

GET /v1/games/{game}/connect/sessions · requires players:connect

Use it to follow the sessions your server started without one request for each. It reads sessions by ID: it does not page through every session of a game.

Path parameters

Prop

Type

Query parameters

Prop

Type

Returns

data is the list of the sessions that were found, oldest first. An ID of another game or community is left out, and so is one that does not exist. The whole list is returned in one response, so page.nextCursor is always null and page.limit is the number of sessions in the response.

Prop

Type

connection holds:

Prop

Type

statusThe session
pendingWaiting for the member to approve on the connect page
needs_game_confirmationThe member approved, or the game attached a member's code. Waiting for the game to confirm
needs_confirmationA session a member started in Discord that the game has confirmed. The member confirms in Discord
approvedBoth approved. The connection is saved
declinedThe member pressed Cancel, or kept the player they were connected to
cancelledThe game declined, or a newer session for the same player superseded it
expiredThe 10 minutes have passed
lockedThe code was entered incorrectly five times
refusedThe connection could not be made: see reason

This list may grow: handle unknown values.

reasonWhy the session ended
member_cancelledThe member pressed Cancel, or kept the player they had
game_declinedThe game declined
bannedThe Discord account is banned from the server
player_blockedThe community blocked the player
player_already_connectedThe player is connected to another Discord account, and could not be moved
expiredThe 10 minutes passed
too_many_triesThe code was entered incorrectly five times
under_ageThe player is under age
nullThe session is open or approved, a newer session for the same player superseded it, or the member connected another player in the meantime

Example

Request
curl "https://ceejay.communitystudios.xyz/api/v1/games/rugby_manager/connect/sessions?ids=kT3v9QmZ1xY7bLw2RfA8cN,B8nLq2WxZ5cD7vJ1mK4pRs" \
  -H "Authorization: Bearer $CEEJAY_API_KEY"

The TypeScript tab calls ceejay.connect.listSessions from the TypeScript SDK. It returns the whole response below, with the list in data.

200 OK
{
  "success": true,
  "data": [
    {
      "sessionId": "kT3v9QmZ1xY7bLw2RfA8cN",
      "status": "approved",
      "reason": null,
      "expiresAt": "2026-10-08T18:14:11.000Z",
      "member": {
        "displayName": "Nova",
        "avatarUrl": "https://cdn.discordapp.com/avatars/409876543210987654/a1b2c3d4e5f60718293a4b5c6d7e8f90.png"
      },
      "connection": {
        "discordId": "409876543210987654",
        "playerId": "p_19",
        "proof": "verified",
        "connectedAt": "2026-10-08T18:06:40.000Z",
        "moved": false,
        "previousPlayerId": null
      }
    },
    {
      "sessionId": "B8nLq2WxZ5cD7vJ1mK4pRs",
      "status": "expired",
      "reason": "expired",
      "expiresAt": "2026-10-08T17:40:02.000Z",
      "member": null,
      "connection": null
    }
  ],
  "page": {
    "nextCursor": null,
    "limit": 2
  }
}

How often to poll

A session lasts 10 minutes. Poll every few seconds for open sessions: that is enough, and every call counts toward the game's limit. A paused game can still be read.

The scope

players:connect lets a server act for a player: it can create a pass, and with a pass any player who is already connected at the verified level can be signed in. Keep it on your own server. It is never part of *: a Full Access key returns 403 here. Tick Act for a player when you make the key.

Limits

The Connect requests of a server have a limit of their own: 600 requests a minute for each game, across all five Connect endpoints. They are not counted against the key's own requests per minute. One API key is also capped at 6,000 requests a minute across all five Connect endpoints. The three X-RateLimit headers report the game's limit of 600 once the request has resolved its game, and the key's limit of 6,000 on a response returned before that: see Rate limits.

Errors

StatuscodeerrorWhen
400bad_requestids must be 1 to 100 session IDs, separated by commasids is missing, is sent twice, contains no ID or more than 100, or contains a value that is not a session ID
404not_availableThis is not available on this instance yet.Connect is not enabled for this instance. It is enabled per instance. The body adds feature, which is players. Retrying will not change the response
403community_not_activeThis community is no longer active on CEEJAYThe community removed CEEJAY from its server
404game_not_foundGame not foundThe community has no game with this slug, or the game was removed. A slug that is not 2 to 32 lower-case letters, digits and underscores, starting with a letter, gets this response too
403game_not_allowedThis API key is limited to other gamesThe key is limited to other games of the community
403audience_not_allowedA game made for children cannot connect players or send player dataThe game is set up as made for children. Such a game connects nobody

Every error body also carries requestId, and a 400 with the code bad_request names the invalid field in field. Match on code, not on the message text, which can change.

The errors every request shares (401, 403 for a missing scope, 405, 429, 500) are on the Errors page.

On this page

Community StudiosPrivacyTerms