Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question How to authorize to Approve/Create backfill ticket REST API?

Discussion in 'Matchmaker' started by VmpKalin, Apr 18, 2023.

  1. VmpKalin

    VmpKalin

    Joined:
    Apr 18, 2023
    Posts:
    4
    Hello, I have a question, I got auth token using token-exchange Rest API, so I have ability to create simple tickets, but I can't find right way to authorize to make actions with backfill tickets. As I understand, when I will have backfill ticket id, I should approve it, so I wanna use Rest Api for this action. Also, I could have a wrong view and it can't be done by Rest, could you confirm it?
    Thank you for feedback!
     
  2. lucy-unity

    lucy-unity

    Unity Technologies

    Joined:
    Apr 7, 2021
    Posts:
    16
  3. VmpKalin

    VmpKalin

    Joined:
    Apr 18, 2023
    Posts:
    4
    Okay, how could I find GameServerHosting ip? Could you please help to understand, do I need to configure something, or just use already hosted service?
     
  4. guillaumedUnity

    guillaumedUnity

    Unity Technologies

    Joined:
    Apr 1, 2021
    Posts:
    33
    A few things here,
    If backfill is enabled on the matchmaker configuration, if a server starts and is not full, matchmaker creates a backfill ticket automatically. No need to create one yourself.
    The server when it starts can get the information of the backfill through the matchmaking result (see here: https://docs.unity.com/matchmaker/manual/integrations#Matchmaking_results)
    In those matchmaking result, there is a backfill ticket id, you should just approve this one and ticket will be directly assigned to the server associated to that backfill ticket.

    When approving a backfill ticket, the API returns the updated backfill ticket with all the players added to the match.

    On another hand, the server.json file on the Multiplay server contains the IP:port for the server. See here https://docs.unity.com/game-server-hosting/en/manual/concepts/server-json

    I hope that helps !