Edgegap Integration KitBeta
v2.0
Matchmaking

Tickets

Single-player ticket flow — create, poll, connect, cancel

Edgegap Matchmaker is in active development with frequent updates. For the latest configuration examples, rule types, and API changes, see the official Edgegap Matchmaking docs and In-Depth Guide.

Free tier shuts down after 3 hours. If tickets go straight to CANCELLED, restart your matchmaker from the Edgegap dashboard. Free tier is also limited to 1 deployment at a time.

Step 1 — Build Attributes & Create Ticket

  1. Build a JSON object with your matchmaking attributes. These must match your matchmaker profile configuration.
  2. For latency-based matching, include beacons with measured ping values per region.
  3. Fill FEGIK_CreateMatchmakingStruct with Profile, Attributes JSON, and optionally PlayerIp.
  4. Call CreateMatchmakingTicket.
  5. On success, save the TicketId from the response — you need it for polling and cancellation.

Attributes JSON Format

Your attributes must match the rules in your matchmaker config. Example for a profile with latencies, number_difference, string_equality, and intersection rules:

{
  "beacons": { "Montreal": 12.3, "Toronto": 45.6 },
  "elo_rating": 500.0,
  "selected_game_mode": "BattleRoyale",
  "selected_map": ["solomap"],
  "selected_region": ["North America"]
}

Step 2 — Poll Status & Connect

After creating a ticket, poll GetMatchmakingTicket on a timer until the assignment is available.

  1. Set up a looping timer (every 3-5 seconds).
  2. Call GetMatchmakingTicket with the saved TicketId.
  3. Break the response and check Assignment.IsNullOrEmpty.
  4. When assignment arrives, read FQDN and GamePort.External from the AssignmentStruct.
  5. Connect using open {FQDN}:{ExternalPort} via Execute Console Command.

Ticket Status Flow

Your ticket progresses through these statuses:

StatusMeaning
SEARCHINGLooking for other players matching your rules
TEAM_FOUNDEnough players found for your team, looking for opponents
MATCH_FOUNDAll teams assembled, server deployment starting
HOST_ASSIGNEDServer ready — assignment contains connection details
CANCELLEDTicket expired or was deleted

Save the TicketId persistently (e.g. SaveGame). If your game client crashes, you can resume polling with the same TicketId instead of creating a new ticket.

Cancel Queue

Call DeleteMatchmakingTicket with the TicketId to cancel. Returns 409 Conflict if the match is already found and a deployment is starting — at that point you can't cancel.

Error Handling

  • 429 Too Many Requests — rate limited. Retry with exponential backoff.
  • 404 Not Found — ticket was deleted or reached its removal period. Create a new one.
  • 409 Conflict — can't delete ticket after match is found.

C++ Example

#include "EGIK_CreateMatchmakingTicket.h"

FEGIK_CreateMatchmakingStruct Req;
Req.Profile = TEXT("quickplay");
Req.Attributes = TEXT("{\"beacons\":{\"Montreal\":12.3,\"Toronto\":45.6}}");
// Req.MatchmakingURL/AuthToken optional; empty => plugin settings.

auto* Node = UEGIK_CreateMatchmakingTicket::CreateMatchmakingTicket(Req);
Node->OnSuccess.AddDynamic(this, &UMySubsystem::OnTicketCreated);
Node->Activate();

Legacy Group Tickets

CreateGroupTicket is deprecated for client usage. Use Group Up for party/group flows instead. Keep CreateGroupTicket only for server-to-server compatibility.

On this page