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

> Échange un AuthenticationTicket hérité ou une SecretKey de titre contre un Entity Token, ou actualise un jeton encore valide, en utilisant un PFEntityHandle pour l'authentification.

Méthode permettant d'échanger un AuthenticationTicket hérité ou une SecretKey de titre contre un Entity Token, ou d'actualiser un Entity Token encore valide.

## Syntaxe

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

### Paramètres

**`entityHandle`**   PFEntityHandle

PFEntityHandle à utiliser pour l'authentification.

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

Objet de requête renseigné.

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

XAsyncBlock pour l'opération asynchrone.

### Valeur de retour

Type : HRESULT

Code de résultat de cette opération d'API.

## Notes

Cette API est disponible sur Windows, Linux et macOS. Cette API doit être appelée avec les en-têtes X-SecretKey, X-Authentication ou X-EntityToken. L'en-tête doit être encore valide et ne peut pas être expiré ni révoqué. En cas de réussite, elle émet un nouveau jeton d'entité et génère l'événement PlayStream 'entity\_logged\_in'. Une fois la tâche asynchrone terminée, appelez [PFAuthenticationGetEntityGetResult](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitygetresult) pour obtenir le résultat.

## Configuration requise

**En-tête :** PFAuthentication.h

## Voir aussi

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


## Related topics

- [PFAuthenticationGetEntityGetResult](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitygetresult.md)
- [Notes de publication du SDK C/C++ PlayFab Services](/fr/services/playfab/release-notes/playfab-c/index.md)
- [Vue d'ensemble de l'API C Services - PFAuthentication.h](/fr/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationGetEntityWithSecretKeyAsync](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitywithsecretkeyasync.md)
- [PFAuthenticationValidateEntityTokenAsync](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokenasync.md)
