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

# PFAuthenticationLoginWithGooglePlayGamesServicesRequest

> PFAuthenticationLoginWithGooglePlayGamesServicesRequest データ モデル。Google Play Games サインインは Google OAuth 2.0 資格情報を取得することで行われます。

PFAuthenticationLoginWithGooglePlayGamesServicesRequest データ モデル。Google Play Games サインインは、デバイス上で Android 用 Google Play Games サインイン API を使用して Google OAuth 2.0 資格情報を取得し、この API に渡すことで行われます。ユーザーが初めて Google Play Games アカウントでサインインし、CreateAccount が true に設定されている場合、新しい PlayFab アカウントが作成され、Google Play Games アカウントにリンクされます。それ以外に、Google Play Games アカウントにリンクされた PlayFab アカウントが存在しない場合はその旨を示すエラーが返されるので、タイトルはユーザーが PlayFab アカウントを作成できるよう誘導できます。Android アプリケーションで Google Play Games アカウント資格情報を取得する現在の (推奨される) 方法は、GamesSignInClient.requestServerSideAccess() を呼び出し、その認証コードをこの API の ServerAuthCode パラメーターとして送信することです。これを行う前に、Google API Console で OAuth 2.0 Web アプリケーション クライアント ID を作成し、そのクライアント ID とシークレットをタイトルの PlayFab Game Manager Google アドオンで構成する必要があります。この方法では、ユーザーに追加の Google アカウント権限を求めるプロンプトが必要ないため、可能な限りスムーズなユーザー エクスペリエンスを実現できます。サーバー認証コードの取得に関する詳細情報は、[https://developers.google.com/games/services/android/signin](https://developers.google.com/games/services/android/signin) を参照してください。

## 構文

```cpp theme={null}
typedef struct PFAuthenticationLoginWithGooglePlayGamesServicesRequest {  
    bool createAccount;  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    PFGetPlayerCombinedInfoRequestParams const* infoRequestParameters;  
    const char* playerSecret;  
    const char* serverAuthCode;  
} PFAuthenticationLoginWithGooglePlayGamesServicesRequest;  
```

### メンバー

**`createAccount`**   bool

この ID に現在リンクされている PlayFab アカウントがない場合、自動的に PlayFab アカウントを作成します。

**`customTags`**   PFStringDictionaryEntry const\*<br />*may be nullptr*

(オプション) リクエストに関連付けるオプションのカスタム タグ (ビルド番号、外部トレース識別子など)。

**`customTagsCount`**   uint32\_t

customTags の数

**`infoRequestParameters`**   PFGetPlayerCombinedInfoRequestParams const\*<br />*may be nullptr*

(オプション) ユーザーに対して返す情報のフラグ。

**`playerSecret`**   const char\*<br />*is null-terminated*

(オプション) API リクエスト署名の検証に使用されるプレイヤー シークレット (Enterprise 専用)。

**`serverAuthCode`**   const char\*<br />*is null-terminated*

クライアントで requestServerSideAccess() ([https://developers.google.com/games/services/android/signin](https://developers.google.com/games/services/android/signin)) Google Play Games クライアント API を呼び出して取得した OAuth 2.0 サーバー認証コード。

## 要件

**ヘッダー:** PFAuthenticationTypes.h

## 関連項目

[PFAuthenticationTypes のメンバー](/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members)


## Related topics

- [PFAuthenticationLoginWithGooglePlayGamesServicesAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgoogleplaygamesservicesasync.md)
- [PFAuthenticationReLoginWithGooglePlayGamesServicesAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithgoogleplaygamesservicesasync.md)
- [Services C API overview - PFAuthenticationTypes.h](/ja-jp/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members.md)
- [PFAuthenticationLoginWithGooglePlayGamesServicesGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgoogleplaygamesservicesgetresult.md)
- [PFAuthenticationLoginWithGooglePlayGamesServicesGetResultSize](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgoogleplaygamesservicesgetresultsize.md)
