# Settings fields

> Settings fields for the Robot JavaScript SDK browser add-on, including port number, poll interval, telemetry, and app origin configuration options.

## SDK Settings

The **Settings** property of the Robot JavaScript SDK allows you to personalize and improve your control over the setup of the browser add-on.

```
class Settings {
  portNumber: number;
  pollTimeInterval: number;
  disableTelemetry: boolean;
  appOrigin: string;
}
```

| Attribute | Description |
| --- | --- |
| `portNumber` | Lets you configure custom ports on which the back-end services run on. The default port number is **2323**. |
| `pollTimeInterval` | Lets you specify the time in milliseconds in which the Robot JavaScript SDK keeps track of a process execution from a web page. The default value is 250 milliseconds. This value determines the polling frequency from the web browser |
| `disableTelemetry` | Lets you disable the telemetry flag. The default value is `false`. |
| `appOrigin` | Identifies the application that uses the SDK in the SDK telemetry. The default value is picked up from the `window.location.origin` property. |

```
const robot = UiPathRobot.init();
robot.settings.portNumber = 1234;
robot.settings.pollTimeInterval = 1000; 
robot.settings.disableTelemetry = true; 
robot.settings.appOrigin = 'MyApp';
```

## Add-on Settings

Add-on settings are configured in the `UiPath.config` file: `%ProgramFiles%\UiPathPlatform\Robot\<version>\UiPath.config` for a per-machine installation, or `%LocalAppData%\Programs\UiPathPlatform\Robot\<version>\UiPath.config` for a per-user installation. For details, see [Configuration files](https://docs.uipath.com/robot/standalone/2026.10/admin-guide/configuration-files#accessing-the-file).

The `robotJsSettings` section of the configuration file can contain the following keys. By default, the section is empty and the add-on uses the default values, `2323` for `ListenerPort` and `30` for `TokenExpiryInDays`:

```
<robotJsSettings>
    <add key="ListenerPort" value="2323" />
    <add key="TokenExpiryInDays" value="30" />
</robotJsSettings>
```

| Attribute | Description |
| --- | --- |
| `ListenerPort` | The `UiPath.RobotJS.ServiceHost.exe` starts a **HttpListener** on the configured port and contains the information about other local listeners from the active user session on that system. The port value must match the one configured in the **SDK Settings**. |
| `TokenExpiryInDays` | Any request coming from a new domain needs to have consent from the user to allow access of UiPath Robots from a web application. These consents are valid for the said number of days mentioned in this setting. |

## Default Overlay

It is possible to customize the consent screen displayed when a request is raised from a new domain. Two screens are delivered with the Robot JavaScript SDK:

### Consent Prompt

The `consent-prompt` overlay is displayed when a request to access the UiPath Assistant is raised from a new domain.

![Consent prompt overlay displayed when a new domain requests access to UiPath Assistant](https://dev-assets.cms.uipath.com/assets/images/robot/robot-docs-image-103463-38928177.webp)

### Missing Components

The `missing-components` overlay is displayed when the required add-on is not present on the local machine.

![Missing components overlay displayed when the required add-on is not present](https://dev-assets.cms.uipath.com/assets/images/robot/robot-docs-image-103674-80408f1f.webp)

Overlay messages can be configured as shown in the following example.

```
// Consent code will be written to the console instead of showing default overlay
// Error logged to console when required components are missing instead of showing
// default error overlay
const robot = UiPathRobot.init();
robot.on('consent-prompt', function(consentCode){ console.log(consentCode) });
robot.on('missing-components', function(){ console.log('Missing components') });
```
