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

# PFAuthenticationLoginWithSteamRequest

> PFAuthenticationLoginWithSteamRequest 資料模型。Steam 登入是使用 Steam 工作階段票證來完成。如需票證的詳細資訊，請參閱 Steamworks SDK：https://partner.steamgames.com/documentation/auth. 注意：若要讓 Steam 驗證正常運作，必須在 PlayFab Game Manager 中 (於附加元件市集的 Steam 下) 為遊戲設定 Steam 應用程式識別碼和 Web API 金鑰。您可以從 Steamworks 網站中與您的 App ID 相關聯之任何群組的 [權限] 頁面取得 Web API 金鑰。如果這是使用者第一次使用 Steam 帳戶登入，且 CreateAccount 設定為 true，系統將會建立新的 PlayFab 帳戶，並將其連結至所提供帳戶的 Steam ID。在此情況下，不會有任何電子郵件或使用者名稱與該 PlayFab 帳戶相關聯。否則，如果沒有任何 PlayFab 帳戶連結至 Steam 帳戶，將會傳回指出此情況的錯誤，讓遊戲可以引導使用者建立 PlayFab 帳戶。

PFAuthenticationLoginWithSteamRequest 資料模型。Steam 登入是使用 Steam 工作階段票證來完成。如需票證的詳細資訊，請參閱 Steamworks SDK：[https://partner.steamgames.com/documentation/auth](https://partner.steamgames.com/documentation/auth). 注意：若要讓 Steam 驗證正常運作，必須在 PlayFab Game Manager 中 (於附加元件市集的 Steam 下) 為遊戲設定 Steam 應用程式識別碼和 Web API 金鑰。您可以從 Steamworks 網站中與您的 App ID 相關聯之任何群組的 \[權限] 頁面取得 Web API 金鑰。如果這是使用者第一次使用 Steam 帳戶登入，且 CreateAccount 設定為 true，系統將會建立新的 PlayFab 帳戶，並將其連結至所提供帳戶的 Steam ID。在此情況下，不會有任何電子郵件或使用者名稱與該 PlayFab 帳戶相關聯。否則，如果沒有任何 PlayFab 帳戶連結至 Steam 帳戶，將會傳回指出此情況的錯誤，讓遊戲可以引導使用者建立 PlayFab 帳戶。

## 語法

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

### 成員

**`createAccount`**   bool

如果目前沒有 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 要求簽章的玩家密碼。

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

使用者的驗證權杖，由 Steam 以位元組陣列傳回，並轉換為字串 (例如，位元組 0x08 應變成 "08")。

**`ticketIsServiceSpecific`**   bool const\*<br />*may be nullptr*

（選擇性）如果票證是使用 ISteamUser::GetAuthTicketForWebAPI() 並以 "AzurePlayFab" 作為身分識別字串所產生，則為 True。如果票證是使用 ISteamUser::GetAuthSessionTicket() 產生，則為 False。

## 需求

**標頭：** PFAuthenticationTypes.h

## 另請參閱

[PFAuthenticationTypes 成員](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members)


## Related topics

- [PFAuthenticationLoginWithSteamAsync](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithsteamasync.md)
- [PFAuthenticationReLoginWithSteamAsync](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithsteamasync.md)
- [服務 C API 概觀 - PFAuthenticationTypes.h](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members.md)
- [PFAuthenticationLoginWithSteamIdRequest](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithsteamidrequest.md)
- [PFAuthenticationServerLoginWithSteamIdAsync](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithsteamidasync.md)
