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

# PartyEndpoint::GetUniqueIdentifier

> Gets the network-unique identifier for this endpoint.

Gets the network-unique identifier for this endpoint.

## Syntax

```cpp theme={null}
PartyError GetUniqueIdentifier(  
    uint16_t* uniqueIdentifier  
)  
```

### Parameters

**`uniqueIdentifier`**   uint16\_t\*\
*output*

The output unique identifier.

### Return value

PartyError

`c_partyErrorSuccess` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PartyManager::GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).

## Remarks

This identifier is unique within the endpoint's network and is consistent across all endpoints in a network. It is intended to be used as a compact option for titles to refer to specific endpoints in [PartyLocalEndpoint::SendMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage) data buffers without much bandwidth overhead or the need to manually negotiate identifiers. This identifier is not unique across networks. <br /><br /> For local endpoints, this method will fail until the [PartyEndpointCreatedStateChange](/services/playfab/multiplayer/networking/reference/structs/partyendpointcreatedstatechange) has been provided by [PartyManager::StartProcessingStateChanges()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges). For remote endpoints, this method will always succeed.   <br /><br /> All devices in a network will agree on a given endpoint's unique identifier, but different devices may not see the same endpoints at a given moment. For example, it's possible for endpoint A to send a message to endpoint B that references a newly-created endpoint C's unique identifier, but that message between A and B may arrive before the PartyEndpointCreatedStateChange for endpoint C is generated on endpoint B's device.

## Requirements

**Header:** Party.h

## See also

[PartyEndpoint](/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/partyendpoint)\
[PartyEndpointCreatedStateChange](/services/playfab/multiplayer/networking/reference/structs/partyendpointcreatedstatechange)\
[PartyNetwork::FindEndpointByUniqueIdentifier](/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_findendpointbyuniqueidentifier)


## Related topics

- [PartyNetwork::FindEndpointByUniqueIdentifier](/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_findendpointbyuniqueidentifier.md)
- [PartyNetwork::CreateEndpoint](/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_createendpoint.md)
- [PartyEndpoint::GetLocal](/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getlocal.md)
- [PartyEndpoint::GetDevice](/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getdevice.md)
- [PartyEndpoint::GetNetwork](/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getnetwork.md)
