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

# PFAuthenticationValidateEntityTokenAsync

> 供伺服器驗證用戶端所提供 EntityToken 的方法。只能由遊戲實體呼叫。

供伺服器驗證用戶端所提供 EntityToken 的方法。只能由遊戲實體呼叫。

## 語法

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

### 參數

**`entityHandle`**   PFEntityHandle

用於驗證的 PFEntityHandle。

**`request`**   [PFAuthenticationValidateEntityTokenRequest\*](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationvalidateentitytokenrequest)

已填入的要求物件。

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

用於非同步作業的 XAsyncBlock。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。

## 備註

此 API 適用於 Win32、Linux 和 macOS。指定實體權杖時，會驗證它是否尚未過期或遭到撤銷，並傳回擁有者的詳細資料。非同步工作完成時，請呼叫 [PFAuthenticationValidateEntityTokenGetResultSize](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokengetresultsize) 和 [PFAuthenticationValidateEntityTokenGetResult](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokengetresult) 以取得結果。

## 需求

**標頭：** PFAuthentication.h

## 另請參閱

[PFAuthentication 成員](/zh-TW/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationValidateEntityTokenGetResult](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokengetresult.md)
- [服務 C API 概觀 - PFAuthentication.h](/zh-TW/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationValidateEntityTokenResponse](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationvalidateentitytokenresponse.md)
- [PFAuthenticationValidateEntityTokenGetResultSize](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokengetresultsize.md)
- [PFAuthenticationValidateEntityTokenRequest](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationvalidateentitytokenrequest.md)
