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

# PFAccountManagementClientLinkGooglePlayGamesServicesAccountAsync

> Links the currently signed-in user account to their Google Play Games account, using their Google Play Games account credentials

Links the currently signed-in user account to their Google Play Games account, using their Google Play Games account credentials

## Syntax

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

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

**`request`**   [PFAccountManagementLinkGooglePlayGamesServicesAccountRequest\*](/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementlinkgoogleplaygamesservicesaccountrequest)

Populated request object.

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

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on Win32, Linux, Android, and macOS. Google Play Games sign-in is accomplished by obtaining a Google OAuth 2.0 credential using the Google Play Games sign-in for Android APIs on the device and passing it to this API. See also ClientLoginWithGooglePlayGamesServicesAsync, ClientUnlinkGooglePlayGamesServicesAccountAsync. Call XAsyncGetStatus to get the status of the operation. If the service call is unsuccessful, the async result will be E\_PF\_ACCOUNT\_ALREADY\_LINKED, E\_PF\_GOOGLE\_O\_AUTH\_ERROR, E\_PF\_GOOGLE\_O\_AUTH\_NOT\_CONFIGURED\_FOR\_TITLE, E\_PF\_INVALID\_GOOGLE\_PLAY\_GAMES\_SERVER\_AUTH\_CODE, E\_PF\_INVALID\_GOOGLE\_TOKEN, E\_PF\_LINKED\_ACCOUNT\_ALREADY\_CLAIMED or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling.

## Requirements

**Header:** PFAccountManagement.h

## See also

[PFAccountManagement members](/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members)


## Related topics

- [Services C API overview - PFAccountManagement.h](/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members.md)
- [PFAccountManagementClientLinkGoogleAccountAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientlinkgoogleaccountasync.md)
- [PFAccountManagementClientUnlinkGooglePlayGamesServicesAccountAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientunlinkgoogleplaygamesservicesaccountasync.md)
- [PFAccountManagementClientUnlinkGoogleAccountAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientunlinkgoogleaccountasync.md)
- [PFAccountManagementLinkGooglePlayGamesServicesAccountRequest](/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementlinkgoogleplaygamesservicesaccountrequest.md)
