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

# PFAuthenticationGetEntityAsync

> Troca um AuthenticationTicket herdado ou a SecretKey do título por um Entity Token, ou atualiza um que ainda seja válido, usando um PFEntityHandle para autenticação.

Método para trocar um AuthenticationTicket herdado ou a SecretKey do título por um Entity Token ou para atualizar um Entity Token ainda válido.

## Sintaxe

```cpp theme={null}
HRESULT PFAuthenticationGetEntityAsync(  
    PFEntityHandle entityHandle,  
    const PFAuthenticationGetEntityRequest* request,  
    XAsyncBlock* async  
)  
```

### Parâmetros

**`entityHandle`**   PFEntityHandle

PFEntityHandle a ser usado para autenticação.

**`request`**   [PFAuthenticationGetEntityRequest\*](/pt-BR/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationgetentityrequest)

Objeto de solicitação preenchido.

**`async`**   XAsyncBlock\*<br />*Inout*

XAsyncBlock para a operação assíncrona.

### Valor de retorno

Tipo: HRESULT

Código de resultado desta operação de API.

## Comentários

Esta API está disponível no Windows, Linux e macOS. Esta API deve ser chamada com os cabeçalhos X-SecretKey, X-Authentication ou X-EntityToken. O cabeçalho ainda deve ser válido e não pode estar expirado nem revogado. Se for bem-sucedida, ela emitirá um novo token de entidade e o evento 'entity\_logged\_in' do PlayStream. Quando a tarefa assíncrona for concluída, chame [PFAuthenticationGetEntityGetResult](/pt-BR/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitygetresult) para obter o resultado.

## Requisitos

**Cabeçalho:** PFAuthentication.h

## Confira também

[Membros de PFAuthentication](/pt-BR/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationGetEntityGetResult](/pt-BR/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitygetresult.md)
- [Notas de versão do SDK PlayFab Services para C/C++](/pt-BR/services/playfab/release-notes/playfab-c/index.md)
- [Visão geral da API C do Services - PFAuthentication.h](/pt-BR/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationGetEntityWithSecretKeyAsync](/pt-BR/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitywithsecretkeyasync.md)
- [PFAuthenticationValidateEntityTokenAsync](/pt-BR/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokenasync.md)
