Work with a Slack Bot Client

Use these Apex classes to work with a Slack bot client.

Provides access to a Slack Bot Client so you can perform tasks such as publishing views to the home tab or sending messages to a channel.

Usage

Before you can work with a bot client, register the action and get access to a Slack context. To get access to a Slack client, use the Slack.App class.

Bots are allowed to post in channels where they are members. If your app must post to a DM between two users, consider using a user client instead.

Many Slack API methods require a token. BotClient automatically includes an appropriate token in your requests. For example, ChatPostMessageRequest calls Slack's chat.postMessage method, which requires a token along with a few other arguments. This token is automatically included when you use BotClient to make a request.

The following are methods for BotClient.

Signature

Parameters

req

Type: Slack.AppsUninstallRequest

Return Value

Type: Slack.AppsUninstallResponse

Signature

Parameters

req

Type: Slack.AuthRevokeRequest

Return Value

Type: Slack.AuthRevokeResponse

Signature

Parameters

req

Type: Slack.AuthTeamsListRequest

Return Value

Type: Slack.AuthTeamsListResponse

Signature

Parameters

req

Type: Slack.AuthTestRequest

Return Value

Type: Slack.AuthTestResponse

Signature

Parameters

req

Type: Slack.BotsInfoRequest

Return Value

Type: Slack.BotsInfoResponse

Signature

Parameters

req

Type: Slack.CallsAddRequest

Return Value

Type: Slack.CallsAddResponse

Signature

Parameters

req

Type: Slack.CallsEndRequest

Return Value

Type: Slack.CallsEndResponse

Signature

Parameters

req

Type: Slack.CallsInfoRequest

Return Value

Type: Slack.CallsInfoResponse

Signature

Parameters

req

Type: Slack.CallsParticipantsAddRequest

Return Value

Type: Slack.CallsParticipantsAddResponse

Signature

Parameters

req

Type: Slack.CallsParticipantsRemoveRequest

Return Value

Type: Slack.CallsParticipantsRemoveResponse

Signature

Parameters

req

Type: Slack.CallsUpdateRequest

Return Value

Type: Slack.CallsUpdateResponse

Signature

Parameters

req

Type: Slack.ChatDeleteRequest

Return Value

Type: Slack.ChatDeleteResponse

Signature

Parameters

req

Type: Slack.ChatDeleteScheduledMessageRequest

Return Value

Type: Slack.ChatDeleteScheduledMessageResponse

Signature

Parameters

req

Type: Slack.ChatGetPermalinkRequest

Return Value

Type: Slack.ChatGetPermalinkResponse

Signature

Parameters

req

Type: Slack.ChatMeMessageRequest

Return Value

Type: Slack.ChatMeMessageResponse

Signature

Parameters

req

Type: Slack.ChatPostEphemeralRequest

Return Value

Type: Slack.ChatPostEphemeralResponse

Signature

Parameters

req

Type: Slack.ChatPostMessageRequest

Return Value

Type: Slack.ChatPostMessageResponse

Signature

Parameters

req

Type: Slack.ChatScheduleMessageRequest

Return Value

Type: Slack.ChatScheduleMessageResponse

Signature

Parameters

req

Type: Slack.ChatScheduledMessagesListRequest

Return Value

Type: Slack.ChatScheduledMessagesListResponse

Signature

Parameters

req

Type: Slack.ChatUpdateRequest

Return Value

Type: Slack.ChatUpdateResponse

Signature

Parameters

req

Type: Slack.ConversationsArchiveRequest

Return Value

Type: Slack.ConversationsArchiveResponse

Signature

Parameters

req

Type: Slack.ConversationsCloseRequest

Return Value

Type: Slack.ConversationsCloseResponse

Signature

Parameters

req

Type: Slack.ConversationsCreateRequest

Return Value

Type: Slack.ConversationsCreateResponse

Signature

Parameters

req

Type: Slack.ConversationsHistoryRequest

Return Value

Type: Slack.ConversationsHistoryResponse

Signature

Parameters

req

Type: Slack.ConversationsInfoRequest

Return Value

Type: Slack.ConversationsInfoResponse

Signature

Parameters

req

Type: Slack.ConversationsInviteRequest

Return Value

Type: Slack.ConversationsInviteResponse

Signature

Parameters

req

Type: Slack.ConversationsJoinRequest

Return Value

Type: Slack.ConversationsJoinResponse

Signature

Parameters

req

Type: Slack.ConversationsKickRequest

Return Value

Type: Slack.ConversationsKickResponse

Signature

Parameters

req

Type: Slack.ConversationsLeaveRequest

Return Value

Type: Slack.ConversationsLeaveResponse

Signature

Parameters

req

Type: Slack.ConversationsListRequest

Return Value

Type: Slack.ConversationsListResponse

Signature

Parameters

req

Return Value

Type: Slack.ConversationsMarkResponse

Signature

Parameters

req

Type: Slack.ConversationsMembersRequest

Return Value

Type: Slack.ConversationsMembersResponse

Signature

Parameters

req

Type: Slack.ConversationsOpenRequest

Return Value

Type: Slack.ConversationsOpenResponse

Signature

Parameters

req

Type: Slack.ConversationsRenameRequest

Return Value

Type: Slack.ConversationsRenameResponse

Signature

Parameters

req

Type: Slack.ConversationsRepliesRequest

Return Value

Type: Slack.ConversationsRepliesResponse

Signature

Parameters

req

Type: Slack.ConversationsSetPurposeRequest

Return Value

Type: Slack.ConversationsSetPurposeResponse

Signature

Parameters

req

Type: Slack.ConversationsSetTopicRequest

Return Value

Type: Slack.ConversationsSetTopicResponse

Signature

Parameters

req

Type: Slack.ConversationsUnarchiveRequest

Return Value

Type: Slack.ConversationsUnarchiveResponse

Signature

Parameters

req

Type: Slack.DndInfoRequest

Return Value

Type: Slack.DndInfoResponse

Signature

Parameters

req

Type: Slack.DndTeamInfoRequest

Return Value

Type: Slack.DndTeamInfoResponse

Signature

Parameters

req

Type: Slack.EmojiListRequest

Return Value

Type: Slack.EmojiListResponse

Signature

Parameters

req

Type: Slack.FilesDeleteRequest

Return Value

Type: Slack.FilesDeleteResponse

Signature

Parameters

req

Type: Slack.FilesInfoRequest

Return Value

Type: Slack.FilesInfoResponse

Signature

Parameters

req

Type: Slack.FilesListRequest

Return Value

Type: Slack.FilesListResponse

Signature

Parameters

req

Type: Slack.FilesRemoteAddRequest

Return Value

Type: Slack.FilesRemoteAddResponse

Signature

Parameters

req

Type: Slack.FilesRemoteInfoRequest

Return Value

Type: Slack.FilesRemoteInfoResponse

Signature

Parameters

req

Type: Slack.FilesRemoteListRequest

Return Value

Type: Slack.FilesRemoteListResponse

Signature

Parameters

req

Type: Slack.FilesRemoteRemoveRequest

Return Value

Type: Slack.FilesRemoteRemoveResponse

Signature

Parameters

req

Type: Slack.FilesRemoteShareRequest

Return Value

Type: Slack.FilesRemoteShareResponse

Signature

Parameters

req

Type: Slack.FilesRemoteUpdateRequest

Signature

Parameters

req

Type: Slack.MigrationExchangeRequest

Return Value

Type: Slack.MigrationExchangeResponse

Signature

Parameters

req

Type: Slack.PinsAddRequest

Return Value

Type: Slack.PinsAddResponse

Signature

Parameters

req

Type: Slack.PinsListRequest

Return Value

Type: Slack.PinsListResponse

Signature

Parameters

req

Type: Slack.PinsRemoveRequest

Return Value

Type: Slack.PinsRemoveResponse

Signature

Parameters

req

Type: Slack.ReactionsAddRequest

Return Value

Type: Slack.ReactionsAddResponse

Signature

Parameters

req

Type: Slack.ReactionsGetRequest

Return Value

Type: Slack.ReactionsGetResponse

Signature

Parameters

req

Type: Slack.ReactionsListRequest

Return Value

Type: Slack.ReactionsListResponse

Signature

Parameters

req

Type: Slack.ReactionsRemoveRequest

Return Value

Type: Slack.ReactionsRemoveResponse

Signature

Parameters

req

Type: Slack.StarsAddRequest

Return Value

Type: Slack.StarsAddResponse

Signature

Parameters

req

Type: Slack.TeamInfoRequest

Return Value

Type: Slack.TeamInfoResponse

Signature

Parameters

req

Type: Slack.TeamProfileGetRequest

Return Value

Type: Slack.TeamProfileGetResponse

Signature

Parameters

req

Type: Slack.UsergroupsCreateRequest

Return Value

Type: Slack.UsergroupsCreateResponse

Parameters

req

Parameters

req

Type: Slack.UsergroupsDisableRequest

Return Value

Type: Slack.UsergroupsDisableResponse

Signature

Parameters

req

Type: Slack.UsergroupsEnableRequest

Return Value

Type: Slack.UsergroupsEnableResponse

Signature

Parameters

req

Type: Slack.UsergroupsListRequest

Return Value

Type: Slack.UsergroupsListResponse

Signature

Parameters

req

Type: Slack.UsergroupsUpdateRequest

Return Value

Type: Slack.UsergroupsUpdateResponse

Signature

Parameters

req

Type: Slack.UsergroupsUsersListRequest

Return Value

Type: Slack.UsergroupsUsersListResponse

Signature

Parameters

req

Type: Slack.UsergroupsUsersUpdateRequest

Return Value

Type: Slack.UsergroupsUsersUpdateResponse

Signature

Parameters

Type: Slack.UsersConversationsRequest

Signature

Parameters

req

Type: Slack.UsersGetPresenceRequest

Return Value

Type: Slack.UsersGetPresenceResponse

Signature

Return Value

Type: Slack.UsersInfoResponse

Signature

Return Value

req

Type: Slack.UsersListRequest

Signature

Parameters

req

Type: Slack.UsersLookupByEmailRequest

Return Value

Type: Slack.UsersLookupByEmailResponse

Signature

Parameters

req

Type: Slack.UsersProfileGetRequest

Return Value

Type: Slack.UsersProfileGetResponse

Signature

Parameters

req

Type: Slack.UsersSetActiveRequest

Return Value

Type: Slack.UsersSetActiveResponse

Signature

Parameters

req

Type: Slack.UsersSetPresenceRequest

Return Value

Type: Slack.UsersSetPresenceResponse

Signature

Parameters

req

Type: Slack.ViewsOpenRequest

Return Value

Type: Slack.ViewsOpenResponse

Signature

Parameters

req

Type: Slack.ViewsPublishRequest

Return Value

Type: Slack.ViewsPublishResponse

Signature

Parameters

req

Type: Slack.ViewsPushRequest

Return Value

Type: Slack.ViewsPushResponse

Signature

Parameters

req

Type: Slack.ViewsUpdateRequest

Return Value

Type: Slack.ViewsUpdateResponse

Signature

Parameters

req

Type: Slack.WorkflowsStepCompletedRequest

Return Value

Type: Slack.WorkflowsStepCompletedResponse

Signature

Parameters

req

Type: Slack.WorkflowsStepFailedRequest

Signature

Parameters

req

Type: Slack.WorkflowsUpdateStepRequest

Return Value

Type: Slack.WorkflowsUpdateStepResponse