# Config

**Kind**: interface | **Module**: [io.Connect Desktop](https://docs.interop.io/desktop/reference/javascript/io.connect%20desktop/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/io.connect desktop/config/index.html

Optional configuration object for initializing the io.Connect library.

## Properties

- **`application`** (`string`, optional)
  Application name. If not specified, the value depends on the hosting environment.
  For the browser - `document.title + random number` (e.g., ClientList321333).
  In desktop - `containerName + browserWindowName` (e.g., Internal.ClientList).
- **`appManager`** (`boolean | IOConnectDesktop.AppManager.Mode`, optional) default: `"startOnly"`
  Initializes or disables the App Management API. You can also specify mode in which that App Management API will be initialized.
- **`apps`** (`boolean`, optional) default: `false` *(since io.Connect Desktop 10.0, @interopio/desktop 6.16.0)*
  Initializes or disables the Apps API.
- **`auth`** (`IOConnectCore.Auth | string`, optional)
  Authentication can use one of the following flows:
  - username/password;
  - `token` - access tokens can be generated after successful login from the Auth Provider (e.g., Auth0);
  - `gatewayToken` - Gateway tokens are time limited tokens generated by the Gateway after an explicit request. To generate one, use the `io.connection.authToken()` method;
  - `sspi` - using `sessionId` and authentication challenge callback;
- **`bus`** (`boolean`, optional)
  Enable or disable the Pub/Sub API.
- **`channels`** (`boolean | IOConnectDesktop.Channels.Configuration`, optional) default: `false`
  Initializes or disables the Channels API.
- **`contexts`** (`boolean | ContextsConfig`, optional)
  Enable, disable and configure the Contexts API.
- **`customLogger`** (`IOConnectCore.CustomLogger`, optional)
  Pass this to override the build-in logger and handle logging on your own
- **`displays`** (`boolean`, optional) default: `true`
  Initializes or disables the Displays API.
- **`exposeAPI`** (`boolean`, optional) default: `true`
  Determines whether io.Connect will share the initialized API object upon request via a custom web event.
- **`gateway`** (`GatewayConfig`, optional)
  Configurations for the io.Connect Gateway connection.
- **`identity`** (`{ [key: string]: string | number | boolean }`, optional)
  Specify custom identity fields. Those can also override some of the system fields assigned
- **`insights`** (`boolean | IOInsights.Settings`, optional)
  io.Insights settings for metrics, tracing and logging.
- **`intents`** (`Intents.Config`, optional)
  Configuration for the Intents Resolver UI.
- **`layouts`** (`boolean | IOConnectDesktop.Layouts.Mode | IOConnectDesktop.Layouts.Configuration`, optional) default: `"slim"`
  Initializes or disables the Layouts API. You can also specify mode and configuration with which that Layouts API will be initialized.
- **`libraries`** (`((io: IOConnectDesktop.API, config?: IOConnectDesktop.Config) => Promise<void>)[]`, optional)
  A list of io.Connect factory functions that will be initialized internally to provide access to specific functionalities.
- **`logger`** (`IOConnectCore.Logger.LogLevel | LoggerConfig`, optional)
  Defines logging levels per output target.
- **`metrics`** (`boolean | MetricsConfig`, optional)
  Metrics configurations.
- **`windows`** (`boolean`, optional) default: `true`
  Initializes or disables the Window Management API.

## Related types

- [API](https://docs.interop.io/desktop/reference/javascript/io.connect%20desktop/api/index.md)
- [AppManager](https://docs.interop.io/desktop/reference/javascript/app%20management/appmanager/index.md)
- [Auth](https://docs.interop.io/desktop/reference/javascript/io.connect%20desktop/auth/index.md)
- [Channels](https://docs.interop.io/desktop/reference/javascript/io.connect%20desktop/channels/index.md)
- [Configuration](https://docs.interop.io/desktop/reference/javascript/layouts/configuration/index.md)
- [GatewayConfig](https://docs.interop.io/desktop/reference/javascript/io.connect%20desktop/gatewayconfig/index.md)
- [LogLevel](https://docs.interop.io/desktop/reference/javascript/logger/loglevel/index.md)
- [Logger](https://docs.interop.io/desktop/reference/javascript/insights/logger/index.md)
- [LoggerConfig](https://docs.interop.io/desktop/reference/javascript/io.connect%20desktop/loggerconfig/index.md)
- [MetricsConfig](https://docs.interop.io/desktop/reference/javascript/io.connect%20desktop/metricsconfig/index.md)
- [Mode](https://docs.interop.io/desktop/reference/javascript/app%20management/mode/index.md)
- [Settings](https://docs.interop.io/desktop/reference/javascript/io.connect%20desktop/settings/index.md)
