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

# PFAuthenticationServerLoginWithServerCustomIdAsync

> 使用玩家的自定义标识符从外部服务器后端安全地登录游戏客户端。服务器自定义 ID 和客户端自定义 ID 互斥。

使用玩家的自定义标识符从外部服务器后端安全地登录游戏客户端。服务器自定义 ID 和客户端自定义 ID 互斥，不能用于检索相同的玩家帐户。

## 语法

```cpp theme={null}
HRESULT PFAuthenticationServerLoginWithServerCustomIdAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const char* secretKey,  
    const PFAuthenticationLoginWithServerCustomIdRequest* request,  
    XAsyncBlock* async  
)  
```

### 参数

**`serviceConfigHandle`**   PFServiceConfigHandle

从 PFServiceConfigCreateHandle 调用返回的 PFServiceConfigHandle。

**`secretKey`**   char\*<br />*In\_z*

用于对服务请求进行身份验证的游戏密钥。

**`request`**   [PFAuthenticationLoginWithServerCustomIdRequest\*](/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithservercustomidrequest)

已填充的请求对象。

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

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 可在 Win32、Linux 和 macOS 上使用。异步任务完成后，调用 [PFAuthenticationServerLoginWithServerCustomIdGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidgetresult) 获取结果。

## 要求

**头文件：** PFAuthentication.h

## 另请参阅

[PFAuthentication 成员](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationServerLoginWithServerCustomIdGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidgetresult.md)
- [PFAuthenticationServerLoginWithServerCustomIdGetResultSize](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidgetresultsize.md)
- [服务 C API 概览 - PFAuthentication.h](/zh-CN/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationLoginWithServerCustomIdRequest](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithservercustomidrequest.md)
- [PFAuthenticationServerLoginWithXboxIdAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidasync.md)
