Skip to main content

Create Or Join Session

POST 

/session/v1/session

Join the first publicly available session of given type. If there is no public session, and the session type permits player made sessions, create a new session and put the player in it

Required Permissions:

  • For any player (including themselves) any of: session:*, session:create

Required Session Permissions: None

Request

Body

required

    client_version Client Version (string)required

    String representation of semver for client

    client_settings

    object

    required

    A player's platform and input settings

    platform_id PlatformID (integer)

    Possible values: [2, 4, 5, 9, 10, 11, 13, 16, 22, 24, 26, 28]

    DEPRECATED. Use 'platform' instead. Id for which platform this client is on. ID will be ignored if 'platform' is given. At least one of the two is required

    platform Platform (string)

    Possible values: [Anon, Basic, XboxLive, PSN, NintendoNAID, NintendoSwitch, NintendoPPID, Google, GooglePlay, Apple, Epic, Steam, Amazon, Twitch, RallyHere, LegacyName]

    Which platform this client is on. If one is not provided, will get the platform from the 'platform_id'. Platform is now read from client's authorization claims if available

    input Input (string)required

    Possible values: [keyboardandmouse, gamepad, touch]

    Which input type this client is using

    device_type DeviceType (string)

    Possible values: [pc, xbox_series, xbox_one, web]

    Platform verified device type for this client

    crossplay_preferences

    object

    A session's or player's preferences around crossplay platforms and inputs. Permitted platforms and inputs will be checked when new players attempt to join a session

    permitted_platform CrossplayPlatform (string)required

    Possible values: [desired_platforms_any, desired_platforms_xboxlike, desired_platforms_playstationlike]

    The platform type that the client is allowed to play with (any, xbox-like only, playstation-like only etc.)

    permitted_input CrossplayInput (string)required

    Possible values: [desired_inputs_any, desired_inputs_keyboardandmouse, desired_inputs_gamepad, desired_inputs_touch]

    The input type that the client is allowed to play with (keyboard and mouse, gamepad, touch input etc.)

    session_type Session Type (string)required

    Type of session client is creating or joining

    password Password (string)

    Possible values: non-empty and <= 128 characters

    Password to set on a session if a new one is created

    region_id Region Id (string)

    Possible values: non-empty and <= 128 characters

    Preferred region for the instance and match to take place in

    player

    object

    A request body for a player updating information about themselves

    status SessionPlayerStatus (string)

    Possible values: [leader, member, invited, reserved]

    Default value: member

    Status that the player would like after the request is complete. Note that some join operations may promote the player from member to leader

    client_version Client Version (string)required

    Semver for updated client

    client_settings

    object

    required

    Which input type and platform the client is using

    platform_id PlatformID (integer)

    Possible values: [2, 4, 5, 9, 10, 11, 13, 16, 22, 24, 26, 28]

    DEPRECATED. Use 'platform' instead. Id for which platform this client is on. ID will be ignored if 'platform' is given. At least one of the two is required

    platform Platform (string)

    Possible values: [Anon, Basic, XboxLive, PSN, NintendoNAID, NintendoSwitch, NintendoPPID, Google, GooglePlay, Apple, Epic, Steam, Amazon, Twitch, RallyHere, LegacyName]

    Which platform this client is on. If one is not provided, will get the platform from the 'platform_id'. Platform is now read from client's authorization claims if available

    input Input (string)required

    Possible values: [keyboardandmouse, gamepad, touch]

    Which input type this client is using

    device_type DeviceType (string)

    Possible values: [pc, xbox_series, xbox_one, web]

    Platform verified device type for this client

    team_id Team Id (integer)required

    Which team the player is one

    crossplay_preferences

    object

    Client's desired crossplay settings to determine which other clients it can play with. If not defined, assumed to be as permissive as possible

    permitted_platform CrossplayPlatform (string)required

    Possible values: [desired_platforms_any, desired_platforms_xboxlike, desired_platforms_playstationlike]

    The platform type that the client is allowed to play with (any, xbox-like only, playstation-like only etc.)

    permitted_input CrossplayInput (string)required

    Possible values: [desired_inputs_any, desired_inputs_keyboardandmouse, desired_inputs_gamepad, desired_inputs_touch]

    The input type that the client is allowed to play with (keyboard and mouse, gamepad, touch input etc.)

    custom_data

    object

    player-defined custom data

    property name* string
    password Password (string)

    Possible values: non-empty and <= 128 characters

    Password to join a password protected session that you are not invited to

Responses

Successful Response

Schema

    session_id Session Id (string)required

    Possible values: non-empty and <= 128 characters

    Session ID the player is now a part of

Loading...