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

# PFServiceConfigGetTitleId

> Gets the PlayFab titleId for a service configuration.

Gets the PlayFab titleId for a service configuration.

## Syntax

```cpp theme={null}
HRESULT PFServiceConfigGetTitleId(  
    PFServiceConfigHandle handle,  
    size_t titleIdSize,  
    char* titleId,  
    size_t* titleIdUsed  
)  
```

### Parameters

**`handle`**   PFServiceConfigHandle

ServiceConfig handle.

**`titleIdSize`**   size\_t

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

**`titleId`**   char\*\
*Out\_writes(titleIdSize)*

Buffer the titleId will be written to.

**`titleIdUsed`**   size\_t\*\
*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:** PFServiceConfig.h

## See also

[PFServiceConfig members](https://docs.xbox.com/services/playfab/api-references/c/pfserviceconfig/pfserviceconfig_members.md)


## Related topics

- [Services C API overview - PFServiceConfig.h](https://docs.xbox.com/services/playfab/api-references/c/pfserviceconfig/pfserviceconfig_members.md)
- [SDK Lifecycle](https://docs.xbox.com/services/playfab/sdks/c/lifecycle.md)
- [PFServiceConfigGetTitleIdSize](https://docs.xbox.com/services/playfab/api-references/c/pfserviceconfig/functions/pfserviceconfiggettitleidsize.md)
- [PFEntityGetTitleId](https://docs.xbox.com/services/playfab/api-references/c/pfentity/functions/pfentitygettitleid.md)
- [XGameGetXboxTitleId](https://docs.xbox.com/reference/system/xgame/functions/xgamegetxboxtitleid.md)
