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

# PFAuthenticationServerLoginWithBattleNetAsync

> Sign in the user with a Battle.net identity token

Sign in the user with a Battle.net identity token

## Syntax

```cpp theme={null}
HRESULT PFAuthenticationServerLoginWithBattleNetAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const char* secretKey,  
    const PFAuthenticationServerLoginWithBattleNetRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigHandle returned from PFServiceConfigCreateHandle call.

**`secretKey`**   char\*<br />*In\_z*

Title Secret Key used to authenticate the service request.

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

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 Windows. See also ServerLinkBattleNetAccountAsync, ServerUnlinkBattleNetAccountAsync. When the asynchronous task is complete, call [PFAuthenticationServerLoginWithBattleNetGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithbattlenetgetresult) to get the result.

## Requirements

**Header:** PFAuthentication.h

## See also

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