---
title: "Settings client"
slug: "settings-client-1523456"
abstract: ""
---
# Settings client

The SDK provides a **Settings client** to provide some extra utilities for retrieving settings.

Settings are entities that can be used with the **Querying client** and the **Entities client**. This client can be useful for replacing some queries that would otherwise have to be manually written.

> [!note]
> The `client` variable in the following code examples refers to the `ContentHubClient` instance. When using the JavaScript SDK, the variable name can be chosen freely, but is also called `client` at instantiation in the documentation.

## Getting the category ID

For example, the following snippet gets the ID of the *PortalConfiguration* category:

```javascript
var id: number = await client.settings.getCategoryIdAsync("PortalConfiguration");

```

## Getting a setting

For example, in the *PortalConfiguration* category, there is a setting named *Authentication* that can be retrieved using the following method:

```javascript
var setting: IEntity = await client.settings.getSettingAsync("PortalConfiguration", "Authentication");

```

It is possible to pass an entity load configuration to the client.

## Getting all the settings for a category

Getting all the settings for a category is also possible. For example, the following snippet gets all the rendition settings:

```javascript
var renditionSettings : IEntity[] = await client.settings.getSettingsForCategoryAsync("Renditions");

```

It is possible to pass an entity load configuration.