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

# PFAuthenticationGetEntityAsync

> 従来の AuthenticationTicket をエンティティ トークンと交換するか、PlayFab クライアント SDK が API 呼び出しに使用する、有効なエンティティ トークンをリフレッシュします。

従来の AuthenticationTicket またはタイトルの SecretKey をエンティティ トークンと交換するか、まだ有効なエンティティ トークンをリフレッシュするメソッド。

## 構文

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

### パラメーター

**`entityHandle`**   PFEntityHandle

認証に使用する PFEntityHandle。

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

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

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

非同期操作用の XAsyncBlock。

### 戻り値

型: HRESULT

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

## 解説

この API は Win32、Linux、および macOS で利用できます。この API は、X-SecretKey、X-Authentication、または X-EntityToken ヘッダーで呼び出す必要があります。EntityKey を省略可能で指定して、結果として得られる EntityToken を特定のエンティティに設定しようとすることができますが、そのエンティティは呼び出し元の関連 (キャラクターの master\_player\_account など) である必要があります。X-EntityToken を送信すると、アカウントは新たにログインしたものとしてマークされ、新しいトークンが発行されます。X-Authentication または X-EntityToken を使用する場合、ヘッダーは有効である必要があり、期限切れまたは取り消されている場合は使用できません。非同期タスクが完了したら、[PFAuthenticationGetEntityGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitygetresult) を呼び出して結果を取得します。

## 要件

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

## 関連項目

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


## Related topics

- [PFAuthenticationGetEntityGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitygetresult.md)
- [Services C API overview - PFAuthentication.h](/ja-jp/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationGetEntityWithSecretKeyAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitywithsecretkeyasync.md)
- [PFAuthenticationGetEntityWithSecretKeyGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitywithsecretkeygetresult.md)
- [PFAuthenticationValidateEntityTokenAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokenasync.md)
