Work with a Slack User Client

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

Provides access to a Slack User 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.

Many Slack API methods require a token. UserClient 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 UserClient to make a request.

UserClient Methods

The following are methods for UserClient.

apiTest(req)

Signature

Parameters

req

Type: Slack.ApiTestRequest

Return Value

Type: Slack.ApiTestResponse

appsEventAuthorizationsList(req)

Signature

Parameters

req

Type: Slack.AppsEventAuthorizationsListRequest

Return Value

Type: Slack.AppsEventAuthorizationsListResponse

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

public Slack.ConversationsLeaveResponse conversationsLeave(Slack.ConversationsLeaveRequest req)

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

Type: Slack.ConversationsMarkRequest

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

dndEndDnd(req)

Signature

Parameters

req

Type: Slack.DndEndDndRequest

Return Value

Type: Slack.DndEndDndResponse

dndEndSnooze(req)

Signature

Parameters

req

Type: Slack.DndEndSnoozeRequest

Return Value

Type: Slack.DndEndSnoozeResponse

dndInfo(req)

Signature

Parameters

req

Type: Slack.DndInfoRequest

Return Value

Type: Slack.DndInfoResponse

dndSetSnooze(req)

Signature

Parameters

req

Type: Slack.DndSetSnoozeRequest

Return Value

Type: Slack.DndSetSnoozeResponse

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

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

filesRemoteShare(req)

Signature

Parameters

req

Type: Slack.FilesRemoteShareRequest

Return Value

Type: Slack.FilesRemoteShareResponse

filesRevokePublicURL(req)

Signature

Parameters

req

Type: Slack.FilesRevokePublicURLRequest

Return Value

Type: Slack.FilesRevokePublicURLResponse

filesSharedPublicURL(req)

Signature

Parameters

req

Type: Slack.FilesSharedPublicURLRequest

Return Value

Type: Slack.FilesSharedPublicURLResponse

filesUpload(req)

Signature

Parameters

req

Type: Slack.FilesUploadRequest

Return Value

Type: Slack.FilesUploadResponse

getErrors()

Signature

Return Value

Type: List<String>

migrationExchange(req)

Signature

Parameters

req

Type: Slack.MigrationExchangeRequest

Return Value

Type: Slack.MigrationExchangeResponse

pinsAdd(req)

Signature

Parameters

req

Type: Slack.PinsAddRequest

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

remindersAdd(req)

Signature

Parameters

req

Type: Slack.RemindersAddRequest

Return Value

Type: Slack.RemindersAddResponse

remindersComplete(req)

Signature

Parameters

req

Type: Slack.RemindersCompleteRequest

Return Value

Type: Slack.RemindersCompleteResponse

remindersDelete(req)

Signature

Parameters

req

Type: Slack.RemindersDeleteRequest

Return Value

Type: Slack.RemindersDeleteResponse

remindersInfo(req)

Signature

Parameters

req

Type: Slack.RemindersInfoRequest

Return Value

Type: Slack.RemindersInfoResponse

remindersList(req)

Signature

Parameters

req

Type: Slack.RemindersListRequest

Return Value

Type: Slack.RemindersListResponse

searchAll(req)

Signature

Parameters

req

Type: Slack.SearchAllRequest

Return Value

Type: Slack.SearchAllResponse

searchFiles(req)

Signature

Parameters

req

Type: Slack.SearchFilesRequest

Return Value

Type: Slack.SearchFilesResponse

searchMessages(req)

Signature

Parameters

req

Type: Slack.SearchMessagesRequest

Return Value

Type: Slack.SearchMessagesResponse

starsAdd(req)

Signature

Parameters

req

Type: Slack.StarsAddRequest

Return Value

Type: Slack.StarsAddResponse

starsList(req)

Signature

Parameters

req

Type: Slack.StarsListRequest

Return Value

Type: Slack.StarsListResponse

starsRemove(req)

Signature

Parameters

req

Type: Slack.StarsRemoveRequest

Return Value

Type: Slack.StarsRemoveResponse

teamAccessLogs(req)

Signature

Parameters

req

Type: Slack.TeamAccessLogsRequest

Return Value

Type: Slack.TeamAccessLogsResponse

teamBillableInfo(req)

Signature

Parameters

req

Type: Slack.TeamBillableInfoRequest

Return Value

Type: Slack.TeamBillableInfoResponse

teamInfo(req)

Signature

Parameters

req

Type: Slack.TeamInfoRequest

Return Value

Type: Slack.TeamInfoResponse

teamIntegrationLogs(req)

Signature

Parameters

req

Type: Slack.TeamIntegrationLogsRequest

Return Value

Type: Slack.TeamIntegrationLogsResponse

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)

Signature

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

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

req

Type: Slack.UsersConversationsRequest

Return Value

Type: Slack.UsersConversationsResponse

usersDeletePhoto(req)

Signature

Parameters

req

Type: Slack.UsersDeletePhotoRequest

Return Value

Type: Slack.UsersDeletePhotoResponse

usersGetPresence(req)

Signature

Parameters

req

Type: Slack.UsersGetPresenceRequest

Return Value

Type: Slack.UsersGetPresenceResponse

usersIdentity(req)

Signature

Parameters

req

Type: Slack.UsersIdentityRequest

Return Value

Type: Slack.UsersIdentityResponse

usersInfo(req)

Signature

Parameters

req

Type: Slack.UsersInfoRequest

Return Value

Type: Slack.UsersInfoResponse

usersList(req)

Signature

Parameters

req

Type: Slack.UsersListRequest

Return Value

Type: Slack.UsersListResponse

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

usersProfileSet(req)

Signature

Parameters

req

Type: Slack.UsersProfileSetRequest

Return Value

Type: Slack.UsersProfileSetResponse

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

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