> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFAuthenticationGetEntityWithSecretKeyAsync

> 타이틀 SecretKey를 Entity Token으로 교환하거나, PlayFab 서버 측 통합이 API 호출에 사용하는 아직 유효한 Entity Token을 새로 고칩니다.

레거시 AuthenticationTicket 또는 타이틀 SecretKey를 Entity Token으로 교환하거나, 아직 유효한 Entity Token을 새로 고치는 메서드입니다.

## Syntax

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

### Parameters

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigCreateHandle 호출에서 반환된 PFServiceConfigHandle입니다.

**`secretKey`**   char\*\
*In\_z*

서비스 요청을 인증하는 데 사용되는 타이틀 비밀 키입니다.

**`request`**   [PFAuthenticationGetEntityRequest\*](https://docs.xbox.com/ko/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationgetentityrequest.md)

값이 채워진 요청 객체입니다.

**`async`**   XAsyncBlock\*\
*Inout*

비동기 작업을 위한 XAsyncBlock입니다.

### Return value

Type: HRESULT

이 API 작업의 결과 코드입니다.

## Remarks

이 API는 Windows, Linux, macOS에서 사용할 수 있습니다. 이 API는 X-SecretKey, X-Authentication 또는 X-EntityToken 헤더와 함께 호출되어야 합니다. 결과 EntityToken을 특정 엔터티로 설정하려고 시도하기 위해 선택적 EntityKey를 포함할 수 있지만, 해당 엔터티는 캐릭터의 master\_player\_account와 같이 호출자의 관계여야 합니다. X-EntityToken을 전송하는 경우, 계정은 새로 로그인된 것으로 표시되고 새 토큰이 발급됩니다. X-Authentication 또는 X-EntityToken을 사용하는 경우, 헤더가 여전히 유효해야 하며 만료되거나 취소되지 않아야 합니다. 비동기 작업이 완료되면 [PFAuthenticationGetEntityWithSecretKeyGetResult](https://docs.xbox.com/ko/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitywithsecretkeygetresult.md)를 호출하여 결과를 가져오세요.

## Requirements

**Header:** PFAuthentication.h

## See also

[PFAuthentication members](https://docs.xbox.com/ko/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)


## Related topics

- [PFAuthenticationGetEntityWithSecretKeyGetResult](https://docs.xbox.com/ko/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationgetentitywithsecretkeygetresult.md)
- [PFSegmentsServerGetAllSegmentsAsync](https://docs.xbox.com/ko/services/playfab/api-references/c/pfsegments/functions/pfsegmentsservergetallsegmentsasync.md)
- [PFTitleDataManagementServerGetTimeAsync](https://docs.xbox.com/ko/services/playfab/api-references/c/pftitledatamanagement/functions/pftitledatamanagementservergettimeasync.md)
- [PFFriendsServerGetFriendsListAsync](https://docs.xbox.com/ko/services/playfab/api-references/c/pffriends/functions/pffriendsservergetfriendslistasync.md)
- [PFSegmentsServerGetPlayerSegmentsAsync](https://docs.xbox.com/ko/services/playfab/api-references/c/pfsegments/functions/pfsegmentsservergetplayersegmentsasync.md)
