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

# PFEntityGetAPIEndpoint

> Gets the API endpoint for the PFServiceConfig associated with an entity handle.

Gets the API endpoint for the PFServiceConfig associated with an entity handle.

## Syntax

```cpp theme={null}
HRESULT PFEntityGetAPIEndpoint(  
    PFEntityHandle entityHandle,  
    size_t apiEndpointSize,  
    char* apiEndpoint,  
    size_t* apiEndpointUsed  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle returned from a auth call.

**`apiEndpointSize`**   size\_t

Size of the provided buffer. Required size can be obtained via PFEntityGetAPIEndpointSize.

**`apiEndpoint`**   char\*<br />*Out\_writes(apiEndpointSize)*

Buffer the API endpoint string will be written to.

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

The number of bytes used in the buffer including the null terminator.

### Return value

Type: HRESULT

Result code for this API operation.

## 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)
- [PFEntityGetAPIEndpointSize](/services/playfab/api-references/c/pfentity/functions/pfentitygetapiendpointsize.md)
- [PartyEndpoint::GetEntityId](/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getentityid.md)
- [PartyEndpoint::GetEntityType](/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getentitytype.md)
