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

> Intercambia un AuthenticationTicket heredado por un Entity Token, o actualiza un Entity Token aún válido que usa el SDK de cliente de PlayFab para las llamadas API.

Método para intercambiar un AuthenticationTicket heredado o una SecretKey de título por un Entity Token, o para actualizar un Entity Token aún válido.

## Sintaxis

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

### Parámetros

**`entityHandle`**   PFEntityHandle

PFEntityHandle que se usará para la autenticación.

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

Objeto de solicitud rellenado.

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

XAsyncBlock para la operación asincrónica.

### Valor devuelto

Tipo: HRESULT

Código de resultado de esta operación de API.

## Comentarios

Esta API está disponible en Win32, Linux y macOS. Esta API debe llamarse con encabezados X-SecretKey, X-Authentication o X-EntityToken. Se puede incluir una EntityKey opcional para intentar establecer el EntityToken resultante en una entidad específica; sin embargo, la entidad debe ser una relación del autor de la llamada, como la master\_player\_account de un personaje. Si se envía X-EntityToken, la cuenta se marcará como recién iniciada la sesión y se emitirá un nuevo token. Si se usa X-Authentication o X-EntityToken, el encabezado debe seguir siendo válido y no puede estar expirado ni revocado. Cuando se complete la tarea asincrónica, llame a [PFAuthenticationGetEntityGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitygetresult) para obtener el resultado.

## Requisitos

**Encabezado:** PFAuthentication.h

## Consulte también

[Miembros de PFAuthentication](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationGetEntityGetResult](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitygetresult.md)
- [Información general de la API de C de Services - PFAuthentication.h](/es/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationGetEntityWithSecretKeyAsync](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitywithsecretkeyasync.md)
- [PFAuthenticationValidateEntityTokenAsync](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokenasync.md)
- [PFAuthenticationGetEntityWithSecretKeyGetResult](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitywithsecretkeygetresult.md)
