An API token to authenticate/authorize with Slack (usually start with xoxp
, xoxb
, or xoxa
)
The backing store for the current access token.
The time (in milliseconds) when the current access token will expire
The time (in milliseconds) when the last token refresh completed
api method family
apps method family
auth method family
Axios HTTP client instance used by this client
bots method family
Processes an HTTP response into a WebAPICallResult by performing JSON parsing on the body and merging relevent HTTP headers into the object.
channels method family
chat method family
OAuth 2.0 client identifier
OAuth 2.0 client secret
conversations method family
dialog method family
dnd method family
emoji method family
files method family
groups method family
im method family
Whether or not a token refresh is currently in progress TODO: maybe this should be a Promise so that other API calls can await this and we don't fill the queue with calls that are destined to fail.
This object's logger instance
Low-level function to make a single API request. handles queing, retries, and http-level errors
migration method family
mpim method family
oauth method family
Automatic pagination page size (limit)
Perform a token refresh. Before calling this method, this.shouldAutomaticallyRefreshToken should be checked.
This method avoids using apiCall()
because that could infinitely recurse when that method determines that the
access token is already expired.
pins method family
reactions method family
OAuth 2.0 refresh token used to automatically create new access tokens (token
) when the current is expired.
Preference for immediately rejecting API calls which result in a rate-limited response
reminders method family
Queue of requests in which a maximum of WebClientOptions.maxRequestConcurrency can concurrently be in-flight.
Configuration for retry operations. See node-retry for more details.
rtm method family
search method family
Transforms options (a simple key-value object) into an acceptable value for a body. This can be either a string, used when posting with a content-type of url-encoded. Or, it can be a readable stream, used when the options contain a binary (a stream or a buffer) and the upload should be done with content-type multipart/form-data.
Determine if this client is in automatic token-refreshing mode
The base URL for reaching Slack's Web API. Consider changing this value for testing purposes.
stars method family
team method family
Configuration for custom TLS handling
Authentication and authorization token for accessing Slack Web API (usually begins with xoxa
, xoxp
, or xoxb
).
This should be treated as readonly. Setting this value is used for refreshing tokens, and it is deprecated.
usergroups method family
users method family
The name used to prefix all logging generated from this object
Generic method for calling a Web API method
the Web API method to call {@see https://api.slack.com/methods}
options
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Add a listener for a given event.
Add a one-time listener for a given event.
Remove all listeners, or those of the specified event.
Remove the listeners of a given event.
Generated using TypeDoc
A client for Slack's Web API
This client provides an alias for each Web API method. Each method is a convenience wrapper for calling the {@link WebClient#apiCall} method using the method name as the first parameter.