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

# PFAuthenticationLoginWithGooglePlayGamesServicesAsync

> Connecte l'utilisateur à l'aide des informations d'identification de son compte Google Play Games

Connecte l'utilisateur à l'aide des informations d'identification de son compte Google Play Games

## Syntaxe

```cpp theme={null}
HRESULT PFAuthenticationLoginWithGooglePlayGamesServicesAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const PFAuthenticationLoginWithGooglePlayGamesServicesRequest* request,  
    XAsyncBlock* async  
)  
```

### Paramètres

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigHandle retourné par l'appel PFServiceConfigCreateHandle.

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

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 Android. La connexion Google Play Games s'effectue en obtenant des informations d'identification Google OAuth 2.0 à l'aide des API de connexion Google Play Games pour Android sur l'appareil, puis en les transmettant à cette API. S'il s'agit de la première connexion d'un utilisateur avec le compte Google Play Games et que CreateAccount a la valeur true, un nouveau compte PlayFab est créé et lié au compte Google Play Games. Sinon, si aucun compte PlayFab n'est lié au compte Google Play Games, une erreur l'indiquant est retournée, afin que le titre puisse guider l'utilisateur dans la création d'un compte PlayFab. La méthode actuelle (recommandée) pour obtenir des informations d'identification de compte Google Play Games dans une application Android consiste à appeler GamesSignInClient.requestServerSideAccess() et à envoyer le code d'authentification en tant que paramètre ServerAuthCode de cette API. Au préalable, vous devez créer un ID client d'application web OAuth 2.0 dans la console Google API et configurer son ID client et son secret dans le module complémentaire Google de PlayFab Game Manager pour votre titre. Cette méthode ne nécessite pas de demander à l'utilisateur des autorisations supplémentaires sur son compte Google, ce qui offre une expérience utilisateur aussi fluide que possible. Pour plus d'informations sur l'obtention du code d'authentification serveur, consultez [https://developers.google.com/games/services/android/signin](https://developers.google.com/games/services/android/signin). Une fois la tâche asynchrone terminée, appelez [PFAuthenticationLoginWithGooglePlayGamesServicesGetResult](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgoogleplaygamesservicesgetresult) 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

- [PFAuthenticationLoginWithGooglePlayGamesServicesGetResultSize](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgoogleplaygamesservicesgetresultsize.md)
- [PFAuthenticationLoginWithGooglePlayGamesServicesGetResult](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgoogleplaygamesservicesgetresult.md)
- [Vue d'ensemble de l'API C Services - PFAuthentication.h](/fr/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationReLoginWithGooglePlayGamesServicesAsync](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithgoogleplaygamesservicesasync.md)
- [PFAuthenticationLoginWithGooglePlayGamesServicesRequest](/fr/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithgoogleplaygamesservicesrequest.md)
