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

> 從外部伺服器後端使用該玩家的自訂識別碼，安全地登入遊戲用戶端。Server Custom ID 與 Client Custom ID 互斥。

從外部伺服器後端使用該玩家的自訂識別碼，安全地登入遊戲用戶端。Server Custom ID 與 Client Custom 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\*](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithservercustomidrequest)

已填入的要求物件。

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

用於非同步作業的 XAsyncBlock。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。

## 備註

此 API 適用於 Win32、Linux 和 macOS。非同步工作完成時，請呼叫 [PFAuthenticationServerLoginWithServerCustomIdGetResult](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidgetresult) 以取得結果。

## 需求

**標頭：** PFAuthentication.h

## 另請參閱

[PFAuthentication 成員](/zh-TW/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationServerLoginWithServerCustomIdGetResultSize](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidgetresultsize.md)
- [PFAuthenticationServerLoginWithServerCustomIdGetResult](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidgetresult.md)
- [服務 C API 概觀 - PFAuthentication.h](/zh-TW/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [Login With Server Custom Id](/api-reference/authentication/login-with-server-custom-id.md)
- [PFAuthenticationLoginWithServerCustomIdRequest](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithservercustomidrequest.md)
