> ## 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\*](/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationauthenticatecustomidrequest)

已填充的请求对象。

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

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

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

## 要求

**头文件：** PFAuthentication.h

## 另请参阅

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


## Related topics

- [PFAuthenticationAuthenticateGameServerWithCustomIdGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationauthenticategameserverwithcustomidgetresult.md)
- [服务 C API 概览 - PFAuthentication.h](/zh-CN/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithServerCustomIdAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidasync.md)
- [PFAuthenticationAuthenticateCustomIdRequest](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationauthenticatecustomidrequest.md)
- [PFAuthenticationAuthenticateCustomIdResult](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationauthenticatecustomidresult.md)
