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

# PFAuthenticationAuthenticateGameServerWithCustomIdAsync

> 建立 game_server 實體權杖，並傳回新的或現有的 game_server 實體。

建立 game\_server 實體權杖，並傳回新的或現有的 game\_server 實體。

## 語法

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

### 參數

**`entityHandle`**   PFEntityHandle

用於驗證的 PFEntityHandle。

**`request`**   [PFAuthenticationAuthenticateCustomIdRequest\*](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationauthenticatecustomidrequest)

已填入的要求物件。

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

用於非同步作業的 XAsyncBlock。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。

## 備註

此 API 適用於 Win32、Linux 和 macOS。建立或傳回 game\_server 實體權杖。呼叫端必須是遊戲實體。非同步工作完成時，呼叫 PFAuthenticationAuthenticateGameServerWithCustomIdGetResultSize 和 [PFAuthenticationAuthenticateGameServerWithCustomIdGetResult](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationauthenticategameserverwithcustomidgetresult) 以取得結果。

## 需求

**標頭：** PFAuthentication.h

## 另請參閱

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


## Related topics

- [PFAuthenticationAuthenticateGameServerWithCustomIdGetResult](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationauthenticategameserverwithcustomidgetresult.md)
- [服務 C API 概觀 - PFAuthentication.h](/zh-TW/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [Authenticate Game Server With Custom Id](/api-reference/authentication/authenticate-game-server-with-custom-id.md)
- [PFAuthenticationServerLoginWithServerCustomIdAsync](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidasync.md)
- [PFAuthenticationAuthenticateCustomIdRequest](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationauthenticatecustomidrequest.md)
