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.

BotClient Methods

The following are methods for BotClient.

appsUninstall(req)

Signature

Parameters

req

Type: Slack.AppsUninstallRequest

Return Value

Type: Slack.AppsUninstallResponse

authRevoke(req)

Signature

Parameters

req

Type: Slack.AuthRevokeRequest

Return Value

Type: Slack.AuthRevokeResponse

authTeamsList(req)

Signature

Parameters

req

Type: Slack.AuthTeamsListRequest

Return Value

Type: Slack.AuthTeamsListResponse

authTest(req)

Signature

Parameters

req

Type: Slack.AuthTestRequest

Return Value

Type: Slack.AuthTestResponse

botsInfo(req)

Signature

Parameters

req

Type: Slack.BotsInfoRequest

Return Value

Type: Slack.BotsInfoResponse

callsAdd(req)

Signature

Parameters

req

Type: Slack.CallsAddRequest

Return Value

Type: Slack.CallsAddResponse

callsEnd(req)

Signature

Parameters

req

Type: Slack.CallsEndRequest

Return Value

Type: Slack.CallsEndResponse

callsInfo(req)

Signature

Parameters

req

Type: Slack.CallsInfoRequest

Return Value

Type: Slack.CallsInfoResponse

callsParticipantsAdd(req)

Signature

Parameters

req

Type: Slack.CallsParticipantsAddRequest

Return Value

Type: Slack.CallsParticipantsAddResponse

callsParticipantsRemove(req)

Signature

Parameters

req

Type: Slack.CallsParticipantsRemoveRequest

Return Value

Type: Slack.CallsParticipantsRemoveResponse

callsUpdate(req)

Signature

Parameters

req

Type: Slack.CallsUpdateRequest

Return Value

Type: Slack.CallsUpdateResponse

chatDelete(req)

Signature

Parameters

req

Type: Slack.ChatDeleteRequest

Return Value

Type: Slack.ChatDeleteResponse

chatDeleteScheduledMessage(req)

Signature

Parameters

req

Type: Slack.ChatDeleteScheduledMessageRequest

Return Value

Type: Slack.ChatDeleteScheduledMessageResponse

chatGetPermalink(req)

Signature

Parameters

req

Type: Slack.ChatGetPermalinkRequest

Return Value

Type: Slack.ChatGetPermalinkResponse

chatMeMessage(req)

Signature

Parameters

req

Type: Slack.ChatMeMessageRequest

Return Value

Type: Slack.ChatMeMessageResponse

chatPostEphemeral(req)

Signature

Parameters

req

Type: Slack.ChatPostEphemeralRequest

Return Value

Type: Slack.ChatPostEphemeralResponse

chatPostMessage(req)

Signature

Parameters

req

Type: Slack.ChatPostMessageRequest

Return Value

Type: Slack.ChatPostMessageResponse

chatScheduleMessage(req)

Signature

Parameters

req

Type: Slack.ChatScheduleMessageRequest

Return Value

Type: Slack.ChatScheduleMessageResponse

chatScheduledMessagesList(req)

Signature

Parameters

req

Type: Slack.ChatScheduledMessagesListRequest

Return Value

Type: Slack.ChatScheduledMessagesListResponse

chatUpdate(req)

Signature

Parameters

req

Type: Slack.ChatUpdateRequest

Return Value

Type: Slack.ChatUpdateResponse

conversationsArchive(req)

Signature

Parameters

req

Type: Slack.ConversationsArchiveRequest

Return Value

Type: Slack.ConversationsArchiveResponse

conversationsClose(req)

Signature

Parameters

req

Type: Slack.ConversationsCloseRequest

Return Value

Type: Slack.ConversationsCloseResponse

conversationsCreate(req)

Signature

Parameters

req

Type: Slack.ConversationsCreateRequest

Return Value

Type: Slack.ConversationsCreateResponse

conversationsHistory(req)

Signature

Parameters

req

Type: Slack.ConversationsHistoryRequest

Return Value

Type: Slack.ConversationsHistoryResponse

conversationsInfo(req)

Signature

Parameters

req

Type: Slack.ConversationsInfoRequest

Return Value

Type: Slack.ConversationsInfoResponse

conversationsInvite(req)

Signature

Parameters

req

Type: Slack.ConversationsInviteRequest

Return Value

Type: Slack.ConversationsInviteResponse

conversationsJoin(req)

Signature

Parameters

req

Type: Slack.ConversationsJoinRequest

Return Value

Type: Slack.ConversationsJoinResponse

conversationsKick(req)

Signature

Parameters

req

Type: Slack.ConversationsKickRequest

Return Value

Type: Slack.ConversationsKickResponse

conversationsLeave(req)

Signature

Parameters

req

Type: Slack.ConversationsLeaveRequest

Return Value

Type: Slack.ConversationsLeaveResponse

conversationsList(req)

Signature

Parameters

req

Type: Slack.ConversationsListRequest

Return Value

Type: Slack.ConversationsListResponse

conversationsMark(req)

Signature

Parameters

req

Return Value

Type: Slack.ConversationsMarkResponse

conversationsMembers(req)

Signature

Parameters

req

Type: Slack.ConversationsMembersRequest

Return Value

Type: Slack.ConversationsMembersResponse

conversationsOpen(req)

Signature

Parameters

req

Type: Slack.ConversationsOpenRequest

Return Value

Type: Slack.ConversationsOpenResponse

conversationsRename(req)

Signature

Parameters

req

Type: Slack.ConversationsRenameRequest

Return Value

Type: Slack.ConversationsRenameResponse

conversationsReplies(req)

Signature

Parameters

req

Type: Slack.ConversationsRepliesRequest

Return Value

Type: Slack.ConversationsRepliesResponse

conversationsSetPurpose(req)

Signature

Parameters

req

Type: Slack.ConversationsSetPurposeRequest

Return Value

Type: Slack.ConversationsSetPurposeResponse

conversationsSetTopic(req)

Signature

Parameters

req

Type: Slack.ConversationsSetTopicRequest

Return Value

Type: Slack.ConversationsSetTopicResponse

conversationsUnarchive(req)

Signature

Parameters

req

Type: Slack.ConversationsUnarchiveRequest

Return Value

Type: Slack.ConversationsUnarchiveResponse

dndInfo(req)

Signature

Parameters

req

Type: Slack.DndInfoRequest

Return Value

Type: Slack.DndInfoResponse

dndTeamInfo(req)

Signature

Parameters

req

Type: Slack.DndTeamInfoRequest

Return Value

Type: Slack.DndTeamInfoResponse

emojiList(req)

Signature

Parameters

req

Type: Slack.EmojiListRequest

Return Value

Type: Slack.EmojiListResponse

filesDelete(req)

Signature

Parameters

req

Type: Slack.FilesDeleteRequest

Return Value

Type: Slack.FilesDeleteResponse

filesInfo(req)

Signature

Parameters

req

Type: Slack.FilesInfoRequest

Return Value

Type: Slack.FilesInfoResponse

filesList(req)

Signature

Parameters

req

Type: Slack.FilesListRequest

Return Value

Type: Slack.FilesListResponse

filesRemoteAdd(req)

Signature

Parameters

req

Type: Slack.FilesRemoteAddRequest

Return Value

Type: Slack.FilesRemoteAddResponse

filesRemoteInfo(req)

Signature

Parameters

req

Type: Slack.FilesRemoteInfoRequest

Return Value

Type: Slack.FilesRemoteInfoResponse

filesRemoteList(req)

Signature

Parameters

req

Type: Slack.FilesRemoteListRequest

Return Value

Type: Slack.FilesRemoteListResponse

filesRemoteRemove(req)

Signature

Parameters

req

Type: Slack.FilesRemoteRemoveRequest

Return Value

Type: Slack.FilesRemoteRemoveResponse

filesRemoteShare(req)

Signature

Parameters

req

Type: Slack.FilesRemoteShareRequest

Return Value

Type: Slack.FilesRemoteShareResponse

filesRemoteUpdate(req)

Signature

Parameters

req

Type: Slack.FilesRemoteUpdateRequest

migrationExchange(req)

Signature

Parameters

req

Type: Slack.MigrationExchangeRequest

Return Value

Type: Slack.MigrationExchangeResponse

pinsAdd(req)

Signature

Parameters

req

Type: Slack.PinsAddRequest

Return Value

Type: Slack.PinsAddResponse

pinsList(req)

Signature

Parameters

req

Type: Slack.PinsListRequest

Return Value

Type: Slack.PinsListResponse

pinsRemove(req)

Signature

Parameters

req

Type: Slack.PinsRemoveRequest

Return Value

Type: Slack.PinsRemoveResponse

reactionsAdd(req)

Signature

Parameters

req

Type: Slack.ReactionsAddRequest

Return Value

Type: Slack.ReactionsAddResponse

reactionsGet(req)

Signature

Parameters

req

Type: Slack.ReactionsGetRequest

Return Value

Type: Slack.ReactionsGetResponse

reactionsList(req)

Signature

Parameters

req

Type: Slack.ReactionsListRequest

Return Value

Type: Slack.ReactionsListResponse

reactionsRemove(req)

Signature

Parameters

req

Type: Slack.ReactionsRemoveRequest

Return Value

Type: Slack.ReactionsRemoveResponse

starsAdd(req)

Signature

Parameters

req

Type: Slack.StarsAddRequest

Return Value

Type: Slack.StarsAddResponse

teamInfo(req)

Signature

Parameters

req

Type: Slack.TeamInfoRequest

Return Value

Type: Slack.TeamInfoResponse

teamProfileGet(req)

Signature

Parameters

req

Type: Slack.TeamProfileGetRequest

Return Value

Type: Slack.TeamProfileGetResponse

usergroupsCreate(req)

Signature

Parameters

req

Type: Slack.UsergroupsCreateRequest

Return Value

Type: Slack.UsergroupsCreateResponse

usergroupsDisable(req)

Parameters

req

Parameters

req

Type: Slack.UsergroupsDisableRequest

Return Value

Type: Slack.UsergroupsDisableResponse

usergroupsEnable(req)

Signature

Parameters

req

Type: Slack.UsergroupsEnableRequest

Return Value

Type: Slack.UsergroupsEnableResponse

usergroupsList(req)

Signature

Parameters

req

Type: Slack.UsergroupsListRequest

Return Value

Type: Slack.UsergroupsListResponse

usergroupsUpdate(req)

Signature

Parameters

req

Type: Slack.UsergroupsUpdateRequest

Return Value

Type: Slack.UsergroupsUpdateResponse

usergroupsUsersList(req)

Signature

Parameters

req

Type: Slack.UsergroupsUsersListRequest

Return Value

Type: Slack.UsergroupsUsersListResponse

usergroupsUsersUpdate(req)

Signature

Parameters

req

Type: Slack.UsergroupsUsersUpdateRequest

Return Value

Type: Slack.UsergroupsUsersUpdateResponse

usersConversations(req)

Signature

Parameters

Type: Slack.UsersConversationsRequest

usersGetPresence(req)

Signature

Parameters

req

Type: Slack.UsersGetPresenceRequest

Return Value

Type: Slack.UsersGetPresenceResponse

usersInfo(req)

Signature

Return Value

Type: Slack.UsersInfoResponse

usersList(req)

Signature

Return Value

req

Type: Slack.UsersListRequest

usersLookupByEmail(req)

Signature

Parameters

req

Type: Slack.UsersLookupByEmailRequest

Return Value

Type: Slack.UsersLookupByEmailResponse

usersProfileGet(req)

Signature

Parameters

req

Type: Slack.UsersProfileGetRequest

Return Value

Type: Slack.UsersProfileGetResponse

usersSetActive(req)

Signature

Parameters

req

Type: Slack.UsersSetActiveRequest

Return Value

Type: Slack.UsersSetActiveResponse

usersSetPresence(req)

Signature

Parameters

req

Type: Slack.UsersSetPresenceRequest

Return Value

Type: Slack.UsersSetPresenceResponse

viewsOpen(req)

Signature

Parameters

req

Type: Slack.ViewsOpenRequest

Return Value

Type: Slack.ViewsOpenResponse

viewsPublish(req)

Signature

Parameters

req

Type: Slack.ViewsPublishRequest

Return Value

Type: Slack.ViewsPublishResponse

viewsPush(req)

Signature

Parameters

req

Type: Slack.ViewsPushRequest

Return Value

Type: Slack.ViewsPushResponse

viewsUpdate(req)

Signature

Parameters

req

Type: Slack.ViewsUpdateRequest

Return Value

Type: Slack.ViewsUpdateResponse

workflowsStepCompleted(req)

Signature

Parameters

req

Type: Slack.WorkflowsStepCompletedRequest

Return Value

Type: Slack.WorkflowsStepCompletedResponse

workflowsStepFailed(req)

Signature

Parameters

req

Type: Slack.WorkflowsStepFailedRequest

workflowsUpdateStep(req)

Signature

Parameters

req

Type: Slack.WorkflowsUpdateStepRequest

Return Value

Type: Slack.WorkflowsUpdateStepResponse