> ## 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.

# PFMatchmakingTicketGetTicketId

> Recupera a ID exclusiva atribuída a um tíquete de matchmaking do PlayFab Multiplayer, usada para ingressar no tíquete ou referenciá-lo a partir de outras sessões de cliente.

Fornece a ID do tíquete.

## Sintaxe

```cpp theme={null}
HRESULT PFMatchmakingTicketGetTicketId(  
    PFMatchmakingTicketHandle ticket,  
    const char** id  
)  
```

### Parâmetros

**`ticket`**   PFMatchmakingTicketHandle

O identificador do tíquete de matchmaking.

**`id`**   char\*\*\
*saída alocada pela biblioteca*

A ID do tíquete.

### Valor retornado

Tipo: HRESULT

`S_OK` se a chamada tiver êxito ou um código de erro caso contrário. A forma legível do código de erro pode ser obtida por meio de [PFMultiplayerGetErrorMessage()](/pt-BR/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage).

## Comentários

A ID do tíquete será uma cadeia de caracteres vazia se ainda não tiver sido definida. Isso pode ocorrer em uma das seguintes condições:

* O tíquete está no estado `PFMatchmakingTicketStatus::Creating`
* O tíquete está no estado `PFMatchmakingTicketStatus::Failed` devido à falha no envio de um tíquete ao serviço de matchmaking
* O tíquete foi cancelado antes que pudesse ser enviado ao serviço de matchmaking

## Requisitos

**Cabeçalho:** PFMatchmaking.h

## Confira também

[Membros do PFMatchmaking](/pt-BR/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members)


## Related topics

- [Visão geral da API C/C++ do PFMultiplayer – PFMatchmaking.h](/pt-BR/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [Notas de versão do SDK C++ do PlayFab Multiplayer](/pt-BR/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [Get Matchmaking Ticket](/api-reference/matchmaking/get-matchmaking-ticket.md)
- [MatchmakingTicket.TicketId](/pt-BR/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/MatchmakingTicket/TicketId.md)
- [PFMultiplayerJoinMatchmakingTicketFromId](/pt-BR/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerjoinmatchmakingticketfromid.md)
