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

# PFEntityGetEntityTokenResult

> Gets the result of a successful PFEntityGetEntityTokenAsync call.

Gets the result of a successful PFEntityGetEntityTokenAsync call.

## Syntax

```cpp theme={null}
HRESULT PFEntityGetEntityTokenResult(  
    XAsyncBlock* async,  
    size_t bufferSize,  
    void* buffer,  
    const PFEntityToken** entityToken,  
    size_t* bufferUsed  
)  
```

### Parameters

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

XAsyncBlock for the async operation.

**`bufferSize`**   size\_t

The size of the buffer for the result object.

**`buffer`**   void\*<br />\**Out\_writes\_bytes\_to*(bufferSize,*bufferUsed)*

Byte buffer used for the result value and its fields.

**`entityToken`**   [PFEntityToken\*\*](/services/playfab/api-references/c/pfentity/structs/pfentitytoken)<br />*library-allocated output*

Pointer to the EntityToken object.

**`bufferUsed`**   size\_t\*<br />*optional output*

The number of bytes in the provided buffer that were used.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

entityToken is a pointer within buffer and does not need to be freed separately.

## Requirements

**Header:** PFEntity.h

## See also

[PFEntity members](/services/playfab/api-references/c/pfentity/pfentity_members)


## Related topics

- [Entity Handles](/services/playfab/sdks/c/entity-handles.md)
- [Services C API overview - PFEntity.h](/services/playfab/api-references/c/pfentity/pfentity_members.md)
- [PFEntityGetEntityTokenResultSize](/services/playfab/api-references/c/pfentity/functions/pfentitygetentitytokenresultsize.md)
- [PFEntityGetEntityTokenAsync](/services/playfab/api-references/c/pfentity/functions/pfentitygetentitytokenasync.md)
- [PFAuthenticationValidateEntityTokenGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokengetresult.md)
