> ## 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 登录。有关该票证的更多信息，请参阅相关文档。

PFAuthenticationLoginWithSteamRequest 数据模型。使用 Steam 会话票证完成 Steam 登录。有关该票证的更多信息，请参阅 Steamworks SDK：[https://partner.steamgames.com/documentation/auth](https://partner.steamgames.com/documentation/auth)。注意：要使 Steam 身份验证正常工作，必须在 PlayFab Game Manager 中（在加载项 Marketplace 的 Steam 下）为游戏配置 Steam 应用程序 ID 和 Web API 密钥。可从 Steamworks 站点上与您的应用 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 帐户链接到此 ID，则自动创建一个。

**`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 成员](/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members)


## Related topics

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