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

# PFAuthenticationServerLoginWithXboxAsync

> Inicia la sesión del usuario mediante un token de XBOX Live desde un back-end de servidor externo y devuelve un identificador de sesión que se puede usar posteriormente para las llamadas de API que.

Inicia la sesión del usuario mediante un token de XBOX Live desde un back-end de servidor externo y devuelve un identificador de sesión que se puede usar posteriormente para las llamadas de API que requieren un usuario autenticado

## Sintaxis

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

### Parámetros

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigHandle devuelto por la llamada a PFServiceConfigCreateHandle.

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

Clave secreta del título usada para autenticar la solicitud de servicio.

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

Objeto de solicitud rellenado.

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

XAsyncBlock para la operación asincrónica.

### Valor devuelto

Tipo: HRESULT

Código de resultado de esta operación de API.

## Comentarios

Esta API está disponible en Win32, Linux y macOS. Si es la primera vez que un usuario inicia sesión con la cuenta de XBOX Live y CreateAccount está establecido en true, se creará una nueva cuenta de PlayFab y se vinculará a la cuenta de XBOX Live. En este caso, no se asociará ningún correo electrónico ni nombre de usuario a la cuenta de PlayFab. De lo contrario, si no hay ninguna cuenta de PlayFab vinculada a la cuenta de XBOX Live, se devolverá un error que lo indique, de modo que el título pueda guiar al usuario en la creación de una cuenta de PlayFab. Vea también ServerLinkXboxAccountAsync, ServerUnlinkXboxAccountAsync. Cuando se complete la tarea asincrónica, llame a [PFAuthenticationServerLoginWithXboxGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresult) para obtener el resultado.

## Requisitos

**Encabezado:** PFAuthentication.h

## Consulte también

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


## Related topics

- [PFAuthenticationServerLoginWithXboxGetResult](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresult.md)
- [PFAuthenticationServerLoginWithXboxGetResultSize](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresultsize.md)
- [Información general de la API de C de Services - PFAuthentication.h](/es/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithXboxIdAsync](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidasync.md)
- [PFAuthenticationServerLoginWithXboxIdGetResult](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidgetresult.md)
