> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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\*](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationauthenticatecustomidrequest.md)

已填充的请求对象。

**`async`**   XAsyncBlock\*\
*Inout*

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 可在 Win32、Linux 和 macOS 上使用。创建或返回 game\_server 实体令牌。调用方必须是游戏实体。异步任务完成后，调用 PFAuthenticationAuthenticateGameServerWithCustomIdGetResultSize 和 [PFAuthenticationAuthenticateGameServerWithCustomIdGetResult](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationauthenticategameserverwithcustomidgetresult.md) 获取结果。

## 要求

**头文件：** PFAuthentication.h

## 另请参阅

[PFAuthentication 成员](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)


## Related topics

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