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

# PFAuthenticationLoginWithPSNAsync

> Connecte l'utilisateur à l'aide d'un code d'authentification PlayStation :tm: Network et retourne un identificateur de session qui peut ensuite être utilisé pour les appels d'API qui.

Connecte l'utilisateur à l'aide d'un code d'authentification PlayStation :tm: Network et retourne un identificateur de session qui peut ensuite être utilisé pour les appels d'API nécessitant un utilisateur authentifié

## Syntaxe

```cpp theme={null}
HRESULT PFAuthenticationLoginWithPSNAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const PFAuthenticationLoginWithPSNRequest* request,  
    XAsyncBlock* async  
)  
```

### Paramètres

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigHandle retourné par l'appel PFServiceConfigCreateHandle.

**`request`**   [PFAuthenticationLoginWithPSNRequest\*](/fr/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithpsnrequest)

Objet de requête renseigné.

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

XAsyncBlock pour l'opération asynchrone.

### Valeur de retour

Type : HRESULT

Code de résultat de cette opération d'API.

## Notes

Cette API est disponible sur Sony PlayStation®. S'il s'agit de la première connexion d'un utilisateur avec le compte PlayStation :tm: Network et que CreateAccount a la valeur true, un nouveau compte PlayFab est créé et lié au compte PlayStation :tm: Network. Dans ce cas, aucune adresse e-mail ni aucun nom d'utilisateur ne sera associé au compte PlayFab. Sinon, si aucun compte PlayFab n'est lié au compte PlayStation :tm: Network, une erreur l'indiquant est retournée, afin que le titre puisse guider l'utilisateur dans la création d'un compte PlayFab. Voir aussi ClientLinkPSNAccountAsync, ClientUnlinkPSNAccountAsync. Une fois la tâche asynchrone terminée, appelez [PFAuthenticationLoginWithPSNGetResult](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithpsngetresult) pour obtenir le résultat.

## Configuration requise

**En-tête :** PFAuthentication.h

## Voir aussi

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


## Related topics

- [PFAuthenticationLoginWithPSNGetResultSize](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithpsngetresultsize.md)
- [PFAuthenticationLoginWithPSNGetResult](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithpsngetresult.md)
- [Vue d'ensemble de l'API C Services - PFAuthentication.h](/fr/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationLoginWithXboxAsync](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithxboxasync.md)
- [PFAuthenticationReLoginWithPSNAsync](/fr/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithpsnasync.md)
