Skip to main content

Interface: WebClientOptions

Defined in: packages/web-api/src/WebClient.ts:79

Properties

adapter?

optional adapter: AxiosAdapter;

Defined in: packages/web-api/src/WebClient.ts:126

Custom functions for modifing and handling outgoing requests. Useful if you would like to manage outgoing request with a custom http client. See Axios adapter documentation for more information.

Default

undefined

agent?

optional agent: Agent;

Defined in: packages/web-api/src/WebClient.ts:91


allowAbsoluteUrls?

optional allowAbsoluteUrls: boolean;

Defined in: packages/web-api/src/WebClient.ts:105

Determines if a dynamic method name being an absolute URL overrides the configured slackApiUrl. When set to false, the URL used in Slack API requests will always begin with the slackApiUrl.

See https://tools.slack.dev/node-slack-sdk/web-api#call-a-method for more details. See https://github.com/axios/axios?tab=readme-ov-file#request-config for more details.

Default

true

attachOriginalToWebAPIRequestError?

optional attachOriginalToWebAPIRequestError: boolean;

Defined in: packages/web-api/src/WebClient.ts:112

Indicates whether to attach the original error to a Web API request error. When set to true, the original error object will be attached to the Web API request error.

Default

true

headers?

optional headers: Record<string, string>;

Defined in: packages/web-api/src/WebClient.ts:95


logger?

optional logger: Logger;

Defined in: packages/web-api/src/WebClient.ts:87


logLevel?

optional logLevel: LogLevel;

Defined in: packages/web-api/src/WebClient.ts:88


maxRequestConcurrency?

optional maxRequestConcurrency: number;

Defined in: packages/web-api/src/WebClient.ts:89


rejectRateLimitedCalls?

optional rejectRateLimitedCalls: boolean;

Defined in: packages/web-api/src/WebClient.ts:94


requestInterceptor?

optional requestInterceptor: RequestInterceptor;

Defined in: packages/web-api/src/WebClient.ts:118

Custom function to modify outgoing requests. See Axios interceptor documentation for more details.

Default

undefined

retryConfig?

optional retryConfig: RetryOptions;

Defined in: packages/web-api/src/WebClient.ts:90


slackApiUrl?

optional slackApiUrl: string;

Defined in: packages/web-api/src/WebClient.ts:86

The base URL requests are sent to. Often unchanged, but might be set for testing techniques.

See https://tools.slack.dev/node-slack-sdk/web-api/#custom-api-url for more information.

Default

https://slack.com/api/

teamId?

optional teamId: string;

Defined in: packages/web-api/src/WebClient.ts:96


timeout?

optional timeout: number;

Defined in: packages/web-api/src/WebClient.ts:93


tls?

optional tls: TLSOptions;

Defined in: packages/web-api/src/WebClient.ts:92