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

> PlayStation :tm: Network の認証コードを使用してユーザーをサインインさせ、以降認証済みユーザーを必要とする API 呼び出しに使用できるセッション識別子を返します。

PlayStation :tm: Network の認証コードを使用してユーザーをサインインさせ、以降認証済みユーザーを必要とする API 呼び出しに使用できるセッション識別子を返します。

## 構文

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

### パラメーター

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigCreateHandle 呼び出しから返される PFServiceConfigHandle。

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

値が設定されたリクエスト オブジェクト。

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

非同期操作用の XAsyncBlock。

### 戻り値

型: HRESULT

この API 操作の結果コード。

## 解説

この API は Sony PlayStation® で利用できます。ユーザーが初めて PlayStation :tm: Network アカウントでサインインし、CreateAccount が true に設定されている場合、新しい PlayFab アカウントが作成され、その PlayStation :tm: Network アカウントにリンクされます。この場合、その PlayFab アカウントにはメール アドレスもユーザー名も関連付けられません。PlayStation :tm: Network アカウントにリンクされた PlayFab アカウントがない場合はそれを示すエラーが返されるため、タイトルはユーザーを PlayFab アカウントの作成に誘導できます。ClientLinkPSNAccountAsync、ClientUnlinkPSNAccountAsync も参照してください。非同期タスクが完了したら、[PFAuthenticationLoginWithPSNGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithpsngetresult) を呼び出して結果を取得します。

## 要件

**ヘッダー:** PFAuthentication.h

## 関連項目

[PFAuthentication のメンバー](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationLoginWithPSNGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithpsngetresult.md)
- [PFAuthenticationLoginWithPSNGetResultSize](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithpsngetresultsize.md)
- [Services C API overview - PFAuthentication.h](/ja-jp/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationReLoginWithPSNAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithpsnasync.md)
- [PFAuthenticationLoginWithSteamAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithsteamasync.md)
