SlackClient reference
Complete reference for the SlackClient in the Knock JavaScript SDK.
Client for interacting with Slack integration operations in the Knock API.
Constructor#
Initializes a new Slack client instance.
Parameters:
The Knock client instance to use for API requests.
Returns: SlackClient
Methods#
authCheck
#Checks the authentication status for a Slack channel integration.
Parameters:
The tenant identifier to check authentication for.
The Knock channel ID for the Slack integration.
Returns: Promise<ApiResponse>
Example:
getChannels
#Retrieves available Slack channels for the authenticated integration.
Parameters:
The Knock channel ID for the Slack integration.
The tenant identifier.
Optional query parameters for filtering and pagination.
Query Options:
Pagination cursor for retrieving the next set of results.
Maximum number of channels to return.
Whether to exclude archived channels from the results.
Slack team ID to filter channels by.
Array of channel types to include (e.g., ['public_channel', 'private_channel']).
Returns: Promise<GetSlackChannelsResponse>
Example:
revokeAccessToken
#Revokes the access token for a Slack integration, effectively disconnecting it.
Parameters:
The tenant identifier.
The Knock channel ID for the Slack integration to revoke access for.
Returns: Promise<ApiResponse>
Example: