> ## 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-CA/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithgoogleplaygamesservicesrequest)

Objet de requête rempli.

**`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.

## Remarques

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. Si c'est la première fois qu'un utilisateur se connecte avec le compte Google Play Games et que CreateAccount est défini sur true, un nouveau compte PlayFab sera 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 sera 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 comme paramètre ServerAuthCode de cette API. Avant de procéder, 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 de compte Google supplémentaires, ce qui offre une expérience utilisateur la plus fluide 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-CA/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-CA/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

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