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

# PFAccountManagementClientLinkSteamAccountAsync

> 将与所提供 Steam 身份验证票据关联的 Steam 账户与用户的 PlayFab 账户关联

将与所提供 Steam 身份验证票据关联的 Steam 账户与用户的 PlayFab 账户关联

## 语法

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

### 参数

**`entityHandle`**   PFEntityHandle

用于身份验证的 PFEntityHandle。

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

已填充的请求对象。

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

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 适用于 Win32、Linux 和 macOS。 Steam 身份验证通过 Steam 会话票据实现。有关该票据的更多信息，请参阅 Steamworks SDK：[https://partner.steamgames.com/documentation/auth](https://partner.steamgames.com/documentation/auth)（需要登录）。注意：要使 Steam 身份验证生效，必须在 PlayFab Game Manager 中（在 Properties 下）为游戏配置 Steam 应用程序 ID 和发布者密钥。有关为游戏创建发布者密钥（在 PlayFab 中称为密钥）的信息，请参阅：[https://partner.steamgames.com/documentation/webapi#publisherkey](https://partner.steamgames.com/documentation/webapi#publisherkey)。 另请参阅 ClientLoginWithSteamAsync, ClientUnlinkSteamAccountAsync。调用 XAsyncGetStatus 以获取操作的状态。 如果服务调用不成功，异步结果将是 E\_PF\_ACCOUNT\_ALREADY\_LINKED, E\_PF\_INVALID\_STEAM\_TICKET, E\_PF\_LINKED\_ACCOUNT\_ALREADY\_CLAIMED, E\_PF\_STEAM\_NOT\_ENABLED\_FOR\_TITLE, E\_PF\_STEAM\_USER\_NOT\_FOUND 或全局 PlayFab 服务错误之一。 有关错误处理的详细信息，请参阅文档页面 "Handling PlayFab Errors"。

## 要求

**头文件：** PFAccountManagement.h

## 另请参阅

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


## Related topics

- [服务 C API 概览 - PFAccountManagement.h](/zh-CN/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members.md)
- [PFAccountManagementClientUnlinkSteamAccountAsync](/zh-CN/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientunlinksteamaccountasync.md)
- [PFAccountManagementServerLinkSteamIdAsync](/zh-CN/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverlinksteamidasync.md)
- [PFAccountManagementClientLinkPSNAccountAsync](/zh-CN/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientlinkpsnaccountasync.md)
- [PFAccountManagementLinkSteamAccountRequest](/zh-CN/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementlinksteamaccountrequest.md)
