.NET (C#) SDK — Matchmaking

Matchmaking

GetMatchmakingLobbiesAsync
public Task<MatchmakingListResponse<T>> GetMatchmakingLobbiesAsync<T>(string? search = null, int? limit = null, CancellationToken ct = default)

Lists all available matchmaking lobbies with typed rules support. Supports search and limit parameters (limit: 1-50).

CreateMatchmakingLobbyAsync
public Task<MatchmakingCreateResponse> CreateMatchmakingLobbyAsync<T>(string gamePlayerToken,
    string matchmakingName,
    int maxPlayers = 4,
    bool strictFull = false,
    bool joinByRequests = false,
    bool hostSwitch = false,
    bool canLeaveRoom = true,
    string? password = null,
    T? rules = null,
    T? playerData = null,
    CancellationToken ct = default)

Creates a new matchmaking lobby with name, optional password, typed rules support, host switching, and player data. Max players: 2-16.

RequestToJoinMatchmakingAsync
public Task<MatchmakingJoinRequestResponse> RequestToJoinMatchmakingAsync(
    string gamePlayerToken,
    string matchmakingId,
    CancellationToken ct = default)

Requests to join a matchmaking lobby that requires host approval.

RespondToJoinRequestAsync
public Task<MatchmakingPermissionResponse> RespondToJoinRequestAsync(
    string gamePlayerToken,
    string requestId,
    MatchmakingRequestAction action,
    CancellationToken ct = default)

Host responds to a join request (approve or reject).

CheckJoinRequestStatusAsync
public Task<MatchmakingRequestStatusResponse> CheckJoinRequestStatusAsync(
    string gamePlayerToken,
    string requestId,
    CancellationToken ct = default)

Checks the status of a join request.

GetCurrentMatchmakingStatusAsync
public Task<MatchmakingCurrentResponse<T>> GetCurrentMatchmakingStatusAsync<T>(string gamePlayerToken, CancellationToken ct = default)

Gets the current player's matchmaking status and lobby information with typed rules.

JoinMatchmakingDirectlyAsync
public Task<MatchmakingDirectJoinResponse> JoinMatchmakingDirectlyAsync(
    string gamePlayerToken,
    string matchmakingId,
    CancellationToken ct = default)

Joins a matchmaking lobby directly (only works if lobby doesn't require approval).

LeaveMatchmakingAsync
public Task<MatchmakingLeaveResponse> LeaveMatchmakingAsync(
    string gamePlayerToken,
    CancellationToken ct = default)

Leaves the current matchmaking lobby.

GetMatchmakingPlayersAsync
public Task<MatchmakingPlayersResponse> GetMatchmakingPlayersAsync(
    string gamePlayerToken,
    CancellationToken ct = default)

Gets all players in the current matchmaking lobby.

SendMatchmakingHeartbeatAsync
public Task<MatchmakingHeartbeatResponse> SendMatchmakingHeartbeatAsync(
    string gamePlayerToken,
    CancellationToken ct = default)

Sends heartbeat to maintain connection in matchmaking lobby.

RemoveMatchmakingLobbyAsync
public Task<MatchmakingRemoveResponse> RemoveMatchmakingLobbyAsync(
    string gamePlayerToken,
    CancellationToken ct = default)

Removes the matchmaking lobby (host only).

StartGameFromMatchmakingAsync
public Task<MatchmakingStartResponse> StartGameFromMatchmakingAsync(
    string gamePlayerToken,
    CancellationToken ct = default)

Starts a game from matchmaking lobby (host only).

StopMatchmakingAsync
public Task<SuccessResponse> StopMatchmakingAsync(
    string gamePlayerToken,
    CancellationToken ct = default)

Stops matchmaking lobby (Host Only). Cannot be called after game has started.

KickPlayerAsync
public Task<MatchmakingKickResponse> KickPlayerAsync(
    string playerToken,
    int playerId,
    CancellationToken ct = default)

Kicks a player from matchmaking lobby (Host Only). Cannot kick yourself or after matchmaking has started.

UpdateMatchmakingPasswordAsync
public Task<SuccessResponse> UpdateMatchmakingPasswordAsync(
    string playerToken,
    string? password = null,
    CancellationToken ct = default)

Updates the matchmaking password (Host Only). Cannot change password after matchmaking has started. Use empty string to remove password.