Kaan Öztüzün avatar image
Kaan Öztüzün asked

Unreal Engine 5 - Get Title Entity / Backfill Ticket


I've been working on GSDK and Matchmaking on Unreal Engine 5. I am able to create matchmaking perfectly, but I want to create backfill ticket system in my project.

However, I realized that I have to call "Create Server Backfill Ticket" on server. I need a title entity before calling this node, according to the community and docs, so all of my Matchmaking logic is located in the Game Instance class.

So I initiated the GSDK and Playfab Settings, delegates(Register GSDK Maintenance, Server Active and Ready for Players) etc...

When there is any request I start to construct JSON objects and then I use "Create Matchmaking Ticket".

So this is works perfectly. The problem starts in here; when matchmaking status turns to "matched" I travel my players into a Lobby Map. I am using a different game mode for this lobby map. In the Game Mode I always count the players. If this match is not equal to 16 players I trigger the Backfill ticket. And this is how I do (In game instance - triggered from game mode):


Unfortunately I am getting this error "The Entity of caller must be one of the types; game_server, title"

So, Game Mode runs on the server side, I tried to create this blueprint in game mode and didn't work. It is the same result when I do this on game instance.

And this is how I get the Entity Token for server on Init.:


I'll be glad if someone can explain to me how works this Entity and backfill tickets.

Thank you!

Title DataunrealMatchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Neils Shi avatar image Neils Shi commented ·

Since everything works fine when you call the GetMatch API (which also requires an entity token), you can use the API ValidateEntityToken on PostMan to see what type the entitytoken is (I guess it's not a title type and creating a backfill ticket needs the title entity token). After successfully getting the entity token, the PlayFab SDK will internally keep the entity token for following API calls, so you may perform operations such as login during this time, which will cause the Entity Token to change.

1 Like 1 ·
Kaan Öztüzün avatar image Kaan Öztüzün Neils Shi commented ·

Hello! Thank you for your help. I Installed the PostMan and try to call ValidateEntityToken API. Unfortunately, it returns with 401 - Not Authenticated.

When I call GetEntityToken with disabled X-Authorization in Header it gives me the Title entity Token.

So when I set the Secret Developer Key on the Unreal - Server side, I call GetEntityToken but no luck...

0 Likes 0 ·

1 Answer

Neils Shi avatar image
Neils Shi answered

The API ValidateEntityToken needs a x-Entity Token in Headers. You should first call GetEntityToken to get title Entity Token, and set it to the X-Entity Token, then you can use ValidateEntityToken to see what type of entity in GetMatch. For more detail, you can see Quickstart: PlayFab REST API collection for Postman.


This is my blueprint for testing, and you can refer to it.


10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kaan Öztüzün avatar image Kaan Öztüzün commented ·

Thank you, Neils! PostMan is a very handy tool thanks to you! I didn't know about it.

Right now I am able to create backfill tickets successfully. Due to some reason which I don't know yet, the players can't join or find the match while the backfill ticket is active. I am suspecting that Members of this server or Matchmaking query.

  1. Two clients request matchmaking

  2. The session becomes an "Active" state

  3. My two clients join.

  4. Manually I quit the game on the client then I request matchmaking.

  5. The Game Mode checks "Is player count equals to 16". If the player count is not equal to 16, I create a Server Backfill ticket.

Unfortunately, it fails to join or find the active game. I realized that after one of my clients left the game the server creates a backfill ticket with the members of the removed client on the server.

This might be the problem so I'll dig into it.

0 Likes 0 ·
Neils Shi avatar image Neils Shi Kaan Öztüzün commented ·

You should create the backfill ticket based on the players currently connected to the server, so that you can avoid creating a backfill ticket with the player who has been disconnected. If you want to know the list of players that are currently connected to your game server, you can refer to Giving PlayFab information about your game server.

0 Likes 0 ·
Ákos Meiszter avatar image Ákos Meiszter Kaan Öztüzün commented ·

Hi did you ever figure this out please? Because I think I am having similar issue, as the Members I am trying to match with is outdated, and lists users who are not in the match anymore. So the BackFill Ticket returns "code":400,"status":"BadRequest","error":"MatchmakingNumberOfPlayersInTicketTooLarge","errorCode":2044,"errorMessage":"Invalid number of users in ticket. The number of users must be less than the max match size of the queue."}

Thanks in advance

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.