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

> Create a game_server entity token and return a new or existing game_server entity.

Create a game\_server entity token and return a new or existing game\_server entity.

## Syntax

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

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

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

Populated request object.

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

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on Win32, Linux, and macOS. Create or return a game\_server entity token. Caller must be a title entity. When the asynchronous task is complete, call PFAuthenticationAuthenticateGameServerWithCustomIdGetResultSize and [PFAuthenticationAuthenticateGameServerWithCustomIdGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationauthenticategameserverwithcustomidgetresult) to get the result.

## Requirements

**Header:** PFAuthentication.h

## See also

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


## Related topics

- [PFAuthenticationAuthenticateGameServerWithCustomIdGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationauthenticategameserverwithcustomidgetresult.md)
- [Services C API overview - PFAuthentication.h](/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithServerCustomIdAsync](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidasync.md)
- [PFAuthenticationAuthenticateCustomIdRequest](/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationauthenticatecustomidrequest.md)
- [PFAuthenticationAuthenticateCustomIdResult](/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationauthenticatecustomidresult.md)
