> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PlayFabMultiplayer.JoinMatchmakingTicketFromId

> PlayFabMultiplayer.JoinMatchmakingTicketFromId

## Method (1 of 2)

Joins one or more multiple local users to a matchmaking ticket using a ticket ID and queue name.

```csharp theme={null}
public static MatchmakingTicket JoinMatchmakingTicketFromId(IList<MatchUser> localUsers, 
    string ticketId, string queueName, IList<PFEntityKey> membersToMatchWith)
```

| parameter          | description                                                                         |
| ------------------ | ----------------------------------------------------------------------------------- |
| localUsers         | The array of local users along with local user attributes to include in the ticket. |
| ticketId           | The ID of the ticket to join.                                                       |
| queueName          | The queue to which the ticket belongs.                                              |
| membersToMatchWith | The other specific users expected to join the ticket.                               |

## Return Value (1 of 2)

The resulting ticket object.

## Remarks (1 of 2)

The library automatically, and asynchronously, will submit all local users to join the ticket on the matchmaking service. Each time the ticket status changes, a [`OnMatchmakingTicketStatusChanged`](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnMatchmakingTicketStatusChanged) will be provided. The ticket status can be quered at any time via [`Status`](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/MatchmakingTicket/Status). The ticket immediately starts in the `MatchmakingTicketStatus.Joining` state.

When the ticket has completed, a [`OnMatchmakingTicketStatusChanged`](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnMatchmakingTicketStatusChanged) will be provided. At that point, a match will have been found or the ticket stopped due to failure. On success, the match that was found can be queried via [`GetMatchDetails`](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/MatchmakingTicket/GetMatchDetails).

All existing tickets in which a local user is a member will be canceled as part of this operation.

***

## Method (2 of 2)

Joins one or more multiple local users to a matchmaking ticket using a ticket ID and queue name.

```csharp theme={null}
public static MatchmakingTicket JoinMatchmakingTicketFromId(MatchUser localUser, string ticketId, 
    string queueName, IList<PFEntityKey> membersToMatchWith)
```

| parameter          | description                                                               |
| ------------------ | ------------------------------------------------------------------------- |
| localUser          | The local user along with local user attributes to include in the ticket. |
| ticketId           | The ID of the ticket to join.                                             |
| queueName          | The queue to which the ticket belongs.                                    |
| membersToMatchWith | The other specific users expected to join the ticket.                     |

## Return Value (2 of 2)

The resulting ticket object.

## Remarks (2 of 2)

The library automatically, and asynchronously, will submit all local users to join the ticket on the matchmaking service. Each time the ticket status changes, a [`OnMatchmakingTicketStatusChanged`](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnMatchmakingTicketStatusChanged) will be provided. The ticket status can be quered at any time via [`Status`](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/MatchmakingTicket/Status). The ticket immediately starts in the `MatchmakingTicketStatus.Joining` state.

When the ticket has completed, a [`OnMatchmakingTicketStatusChanged`](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnMatchmakingTicketStatusChanged) will be provided. At that point, a match will have been found or the ticket stopped due to failure. On success, the match that was found can be queried via [`GetMatchDetails`](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/MatchmakingTicket/GetMatchDetails).

All existing tickets in which a local user is a member will be canceled as part of this operation.

## See Also

* class [MatchmakingTicket](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/MatchmakingTicket/overview)
* struct [MatchUser](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/MatchUser/overview)
* class [PFEntityKey](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PFEntityKey/overview)
* class [PlayFabMultiplayer](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/overview)
* namespace [PlayFab.Multiplayer](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference)


## Related topics

- [PlayFabMultiplayer.CreateMatchmakingTicket](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/CreateMatchmakingTicket.md)
- [PFMultiplayerJoinMatchmakingTicketFromId](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerjoinmatchmakingticketfromid.md)
- [PlayFabMultiplayer.OnMatchmakingTicketCompleted](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnMatchmakingTicketCompleted.md)
- [PlayFabMultiplayer.OnMatchmakingTicketStatusChanged](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnMatchmakingTicketStatusChanged.md)
- [MatchmakingTicketStatus](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/MatchmakingTicketStatus.md)
