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

# PFEntityRegisterTokenRefreshedEventHandler

> Register a handler for EntityToken refreshed events.

Register a handler for EntityToken refreshed events.

## Syntax

```cpp theme={null}
HRESULT PFEntityRegisterTokenRefreshedEventHandler(  
    XTaskQueueHandle queue,  
    void* context,  
    PFEntityTokenRefreshedEventHandler* handler,  
    PFRegistrationToken* token  
)  
```

### Parameters

**`queue`**   XTaskQueueHandle\
*optional*

The async queue the callback should be invoked on.

**`context`**   void\*\
*optional*

Optional pointer to data used by the callback.

**`handler`**   PFEntityTokenRefreshedEventHandler\*

TBD

**`token`**   PFRegistrationToken\*\
*output*

The token for unregistering the callback.

### Return value

Type: HRESULT

Result code for this API operation.

## Requirements

**Header:** PFEntity.h

## See also

[PFEntity members](https://docs.xbox.com/services/playfab/api-references/c/pfentity/pfentity_members.md)


## Related topics

- [Entity Handles](https://docs.xbox.com/services/playfab/sdks/c/entity-handles.md)
- [Handling Token Expiration](https://docs.xbox.com/services/playfab/sdks/c/relogin.md)
- [Services C API overview - PFEntity.h](https://docs.xbox.com/services/playfab/api-references/c/pfentity/pfentity_members.md)
- [PlayFab Services C/C++ SDK Release Notes](https://docs.xbox.com/services/playfab/release-notes/playfab-c/index.md)
- [PFEntityUnregisterTokenRefreshedEventHandler](https://docs.xbox.com/services/playfab/api-references/c/pfentity/functions/pfentityunregistertokenrefreshedeventhandler.md)
