Skip to main content

Interface: SocketModeOptions

Defined in: packages/socket-mode/src/SocketModeOptions.ts:4

Properties

appToken

appToken: string;

Defined in: packages/socket-mode/src/SocketModeOptions.ts:8

The App-level token associated with your app, located under the Basic Information page on api.slack.com/apps.


autoReconnectEnabled?

optional autoReconnectEnabled: boolean;

Defined in: packages/socket-mode/src/SocketModeOptions.ts:22

Whether the client should automatically reconnect when the socket mode connection is disrupted. Defaults to true. Note that disconnects are regular and expected when using Socket Mode, so setting this to false will likely lead to a disconnected client after some amount of time.


clientOptions?

optional clientOptions: Omit<WebClientOptions, "logLevel" | "logger">;

Defined in: packages/socket-mode/src/SocketModeOptions.ts:46

The @slack/web-api WebClientOptions to provide to the HTTP client interacting with Slack's HTTP API. Useful for setting retry configurations, TLS and HTTP Agent options.


clientPingTimeout?

optional clientPingTimeout: number;

Defined in: packages/socket-mode/src/SocketModeOptions.ts:29

How long the client should wait for a pong response to the client's ping to the server, in milliseconds. If this timeout is hit, the client will attempt to reconnect if autoReconnectEnabled is true; otherwise, it will disconnect. Defaults to 5,000.


logger?

optional logger: Logger;

Defined in: packages/socket-mode/src/SocketModeOptions.ts:12

An instance of @slack/logger's Logger interface, to send log messages to.


logLevel?

optional logLevel: LogLevel;

Defined in: packages/socket-mode/src/SocketModeOptions.ts:16

An instance of @slack/logger's LogLevel enum, setting the minimum log level to emit log messages for.


pingPongLoggingEnabled?

optional pingPongLoggingEnabled: boolean;

Defined in: packages/socket-mode/src/SocketModeOptions.ts:41

Should logging related to ping and pong messages between the client and server be logged at a LogLevel.DEBUG level. Defaults to `false.


serverPingTimeout?

optional serverPingTimeout: number;

Defined in: packages/socket-mode/src/SocketModeOptions.ts:36

How long the client should wait for ping messages from the server, in milliseconds. If this timeout is hit, the client will attempt to reconnect if autoReconnectEnabled is true; otherwise, it will disconnect. Defaults to 30,000.