Categorygithub.com/slack-go/slack
modulepackage
0.16.0
Repository: https://github.com/slack-go/slack.git
Documentation: pkg.go.dev

# README

Slack API in Go Go Reference

This is the original Slack library for Go created by Norberto Lopes, transferred to a GitHub organization.

You can also chat with us on the #slack-go, #slack-go-ja Slack channel on the Gophers Slack.

logo

This library supports most if not all of the api.slack.com REST calls, as well as the Real-Time Messaging protocol over websocket, in a fully managed way.

Project Status

There is currently no major version released. Therefore, minor version releases may include backward incompatible changes.

See Releases for more information about the changes.

Installing

go get

$ go get -u github.com/slack-go/slack

Example

Getting all groups

import (
	"fmt"

	"github.com/slack-go/slack"
)

func main() {
	api := slack.New("YOUR_TOKEN_HERE")
	// If you set debugging, it will log all requests to the console
	// Useful when encountering issues
	// slack.New("YOUR_TOKEN_HERE", slack.OptionDebug(true))
	groups, err := api.GetUserGroups(slack.GetUserGroupsOptionIncludeUsers(false))
	if err != nil {
		fmt.Printf("%s\n", err)
		return
	}
	for _, group := range groups {
		fmt.Printf("ID: %s, Name: %s\n", group.ID, group.Name)
	}
}

Getting User Information

import (
    "fmt"

    "github.com/slack-go/slack"
)

func main() {
    api := slack.New("YOUR_TOKEN_HERE")
    user, err := api.GetUserInfo("U023BECGF")
    if err != nil {
	    fmt.Printf("%s\n", err)
	    return
    }
    fmt.Printf("ID: %s, Fullname: %s, Email: %s\n", user.ID, user.Profile.RealName, user.Profile.Email)
}

Minimal Socket Mode usage:

See https://github.com/slack-go/slack/blob/master/examples/socketmode/socketmode.go

Minimal RTM usage:

As mentioned in https://api.slack.com/rtm - for most applications, Socket Mode is a better way to communicate with Slack.

See https://github.com/slack-go/slack/blob/master/examples/websocket/websocket.go

Minimal EventsAPI usage:

See https://github.com/slack-go/slack/blob/master/examples/eventsapi/events.go

Socketmode Event Handler (Experimental)

When using socket mode, dealing with an event can be pretty lengthy as it requires you to route the event to the right place.

Instead, you can use SocketmodeHandler much like you use an HTTP handler to register which event you would like to listen to and what callback function will process that event when it occurs.

See ./examples/socketmode_handler/socketmode_handler.go

Contributing

You are more than welcome to contribute to this project. Fork and make a Pull Request, or create an Issue if you see any problem.

Before making any Pull Request please run the following:

make pr-prep

This will check/update code formatting, linting and then run all tests

License

BSD 2 Clause license

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
Package slackutilsx is a utility package that doesn't promise API stability.
No description provided by the author

# Functions

AddBlockMessage appends a block to the end of the existing list of blocks.
CreateUserGroupOptionEnableSection enable the section for the user group (default: false).
No description provided by the author
GetBotOAuthToken retrieves top-level and bot AccessToken - https://api.slack.com/legacy/oauth#bot_user_access_tokens For more details, see GetBotOAuthTokenContext documentation.
GetBotOAuthTokenContext retrieves top-level and bot AccessToken with a custom context.
No description provided by the author
GetOAuthResponse retrieves OAuth response.
GetOAuthResponseContext retrieves OAuth response with custom context.
GetOAuthToken retrieves an AccessToken.
GetOAuthTokenContext retrieves an AccessToken with a custom context.
GetOAuthV2Response gets a V2 OAuth access token response.
GetOAuthV2ResponseContext with a context, gets a V2 OAuth access token response.
GetOpenIDConnectToken exchanges a temporary OAuth verifier code for an access token for Sign in with Slack.
GetOpenIDConnectTokenContext with a context, gets an access token for Sign in with Slack.
GetUserGroupsOptionIncludeCount include the number of users in each User Group (default: false).
GetUserGroupsOptionIncludeDisabled include disabled User Groups (default: false).
GetUserGroupsOptionIncludeUsers include the list of users for each User Group (default: false).
No description provided by the author
GetUsersOptionLimit limit the number of users returned.
GetUsersOptionPresence include user presence.
GetUsersOptionTeamID include team Id.
No description provided by the author
MsgOptionAsUser whether or not to send the message as the user.
MsgOptionAttachments provide attachments for the message.
MsgOptionBlocks sets blocks for the message.
MsgOptionBroadcast sets reply_broadcast to true.
MsgOptionCompose combines multiple options into a single option.
MsgOptionDelete deletes a message based on the timestamp.
MsgOptionDeleteOriginal deletes original message with response url.
MsgOptionDisableLinkUnfurl disables link unfurling.
MsgOptionDisableMarkdown disables markdown.
MsgOptionDisableMediaUnfurl disables media unfurling.
MsgOptionEnableLinkUnfurl enables link unfurling.
MsgOptionIconEmoji sets an icon emoji.
MsgOptionIconURL sets an icon URL.
MsgOptionLinkNames finds and links user groups.
MsgOptionMeMessage posts a "me message" type from the calling user.
MsgOptionMetadata sets message metadata.
MsgOptionParse set parse option.
MsgOptionPost posts a messages, this is the default.
MsgOptionPostEphemeral - posts an ephemeral message to the provided user.
MsgOptionPostMessageParameters maintain backwards compatibility.
MsgOptionReplaceOriginal replaces original message with response url.
MsgOptionResponseURL supplies a url to use as the endpoint.
MsgOptionSchedule schedules a messages.
MsgOptionText provide the text for the message, optionally escape the provided text.
MsgOptionTS sets the thread TS of the message to enable creating or replying to a thread.
MsgOptionUnfurl unfurls a message based on the timestamp.
MsgOptionUnfurlAuthMessage attaches a message inviting the user to authenticate.
MsgOptionUnfurlAuthRequired requests that the user installs the Slack app for unfurling.
MsgOptionUnfurlAuthURL unfurls a message using an auth url based on the timestamp.
MsgOptionUpdate updates a message based on the timestamp.
MsgOptionUser set the user for the message.
MsgOptionUsername set the username for the message.
New builds a slack client from the provided token and options.
NewAccessLogParameters provides an instance of AccessLogParameters with all the sane default values set.
NewAccessory returns a new Accessory for a given block element.
NewActionBlock returns a new instance of an Action Block.
NewBlockMessage creates a new Message that contains one or more blocks to be displayed.
NewButtonBlockElement returns an instance of a new button element to be used within a block.
NewCallBlock returns a new instance of a call block.
NewChannelItem turns a channel id into a typed channel struct.
NewChannelsSelect returns a `Channels` select.
NewCheckboxGroupsBlockElement returns an instance of a checkbox-group block element.
No description provided by the author
No description provided by the author
NewConfirmationBlockObject returns an instance of a new Confirmation Block Object.
NewContextBlock returns a new instance of a context block.
NewConversationsSelect returns a `Conversations` select.
NewDatePickerBlockElement returns an instance of a date picker element.
NewDatePickerBlockElement returns an instance of a datetime picker element.
NewDialogOptionGroup creates a DialogOptionGroup from several select options.
NewDividerBlock returns a new instance of a divider block.
NewEmailTextInputBlockElement returns an instance of a plain-text input element.
No description provided by the author
NewExternalSelectDialogInput constructor for a `external` datasource menu input.
NewFileBlock returns a new instance of a file block.
NewFileCommentItem turns a file and comment into a typed file_comment struct.
NewFileInputBlockElement returns an instance of a file input element.
NewFileItem turns a file into a typed file struct.
NewGetFilesParameters provides an instance of GetFilesParameters with all the sane default values set.
NewGetReactionsParameters initializes the inputs to get reactions to an item.
NewGroupedSelectDialogInput creates grouped options select input for Dialogs.
NewGroupItem turns a channel id into a typed group struct.
NewHeaderBlock returns a new instance of a header block to be rendered.
NewHistoryParameters provides an instance of HistoryParameters with all the sane default values set.
NewImageBlock returns an instance of a new Image Block type.
NewImageBlockElement returns a new instance of an image block element.
NewIMItem turns a channel id into a typed im struct.
NewInputBlock returns a new instance of an input block.
NewListReactionsParameters initializes the inputs to find all reactions performed by a user.
NewMessageItem turns a message on a channel into a typed message struct.
NewNumberInputBlockElement returns an instance of a number input element.
NewOptionBlockObject returns an instance of a new Option Block Element.
NewOptionGroupBlockElement returns an instance of a new option group block element.
NewOptionsGroupMultiSelectBlockElement returns a new instance of MultiSelectBlockElement for use with the Options object only.
NewOptionsGroupSelectBlockElement returns a new instance of SelectBlockElement for use with the Options object only.
NewOptionsMultiSelectBlockElement returns a new instance of SelectBlockElement for use with the Options object only.
NewOptionsSelectBlockElement returns a new instance of SelectBlockElement for use with the Options object only.
NewOverflowBlockElement returns an instance of a new Overflow Block Element.
NewPlainTextInputBlockElement returns an instance of a plain-text input element.
NewPostMessageParameters provides an instance of PostMessageParameters with all the sane default values set.
No description provided by the author
NewRadioButtonsBlockElement returns an instance of a radio buttons element.
NewRefToComment initializes a reference to a file comment.
NewRefToFile initializes a reference to a file.
NewRefToMessage initializes a reference to to a message.
NewRichTextBlock returns a new instance of RichText Block.
NewRichTextInputBlockElement returns an instance of a rich-text input element.
NewRichTextList returns a new rich text list element.
NewRichTextSectionBlockElement .
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewSafeID returns a new instance of an IDGenerator which is safe for concurrent use by multiple goroutines.
No description provided by the author
NewSecretsVerifier returns a SecretsVerifier object in exchange for an http.Header object and signing secret.
NewSectionBlock returns a new instance of a section block to be rendered.
NewStarsParameters initialises StarsParameters with default values.
NewStaticSelectDialogInput constructor for a `static` datasource menu input.
NewTextAreaInput constructor for a `textarea` input.
NewTextBlockObject returns an instance of a new Text Block Object.
NewTextInput constructor for a `text` input.
NewTimePickerBlockElement returns an instance of a date picker element.
NewUnmappedError returns new UnmappedError instance.
No description provided by the author
NewURLTextInputBlockElement returns an instance of a plain-text input element.
No description provided by the author
NewUsersSelect returns a `Users` select.
NewVideoBlock returns an instance of a new Video Block type.
OptionAPIURL set the url for the client.
OptionAppLevelToken sets an app-level token for the client.
OptionConfigRefreshToken sets a configuration refresh token for the client.
OptionConfigToken sets a configuration token for the client.
OptionDebug enable debugging for the client.
OptionHTTPClient - provide a custom http client to the slack client.
OptionLog set logging for client.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RefreshOAuthV2Token with a context, gets a V2 OAuth access token response.
RefreshOAuthV2TokenContext with a context, gets a V2 OAuth access token response.
RTMOptionConnParams installs parameters to embed into the connection URL.
RTMOptionDialer takes a gorilla websocket Dialer and uses it as the Dialer when opening the websocket for the RTM connection.
RTMOptionPingInterval determines how often to deliver a ping message to slack.
RTMOptionUseStart as of 11th July 2017 you should prefer setting this to false, see: https://api.slack.com/changelog/2017-04-start-using-rtm-connect-and-stop-using-rtm-start.
RTMsgOptionBroadcast sets broadcast reply to channel to "true".
RTMsgOptionTS sets thead timestamp of an outgoing message in order to respond to a thread.
No description provided by the author
SectionBlockOptionExpand allows long text to be auto-expanded when displaying @see https://api.slack.com/reference/block-kit/blocks#section.
SlashCommandParse will parse the request of the slash command.
UnsafeApplyMsgOptions utility function for debugging/testing chat requests.
UnsafeMsgOptionEndpoint deliver the message to the specified endpoint.
UpdateUserGroupsOptionChannels change the default channels of the User Group.
UpdateUserGroupsOptionDescription change the description of the User Group.
UpdateUserGroupsOptionEnableSection enable the section for the user group (default: false).
UpdateUserGroupsOptionHandle change the handle of the User Group (default: empty, so it's no-op).
UpdateUserGroupsOptionName change the name of the User Group (default: empty, so it's no-op).
ValidateUniqueBlockID will verify if each input block has a unique block ID if set.
No description provided by the author

# Constants

APIURL of the slack api.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Add here the defaults in the site.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DialogDataSourceChannels provides a list of channels.
DialogDataSourceConversations provides a list of conversations.
DialogDataSourceExternal dynamic datasource.
DialogDataSourceStatic menu with static Options/OptionGroups.
DialogDataSourceUsers provides a list of users.
Errors returned by various methods.
Errors returned by various methods.
Errors returned by various methods.
Errors returned by various methods.
Errors returned by various methods.
Errors returned by various methods.
Errors returned by various methods.
Errors returned by various methods.
Errors returned by various methods.
No description provided by the author
InputSubtypeEmail email keyboard.
InputSubtypeNumber numeric keyboard.
InputSubtypeTel Phone keyboard.
InputSubtypeURL Phone keyboard.
InputTypeSelect select menus input.
InputTypeText textfield input.
InputTypeTextArea textarea input.
Types of interactions that can be received.
Types of interactions that can be received.
Types of interactions that can be received.
Types of interactions that can be received.
Types of interactions that can be received.
Types of interactions that can be received.
Types of interactions that can be received.
Types of interactions that can be received.
Types of interactions that can be received.
Types of interactions that can be received.
Types of interactions that can be received.
blockObject object types.
MaxMessageTextLength is the current maximum message length in number of characters as defined here https://api.slack.com/rtm#limits.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
[Events API, RTM] The message is an app assistant thread.
[Events API, RTM] A message was posted by an integration.
[Events API, RTM] A channel was archived.
[Events API, RTM] A member joined a channel.
[Events API, RTM] A member left a channel.
[Events API, RTM] A channel was renamed.
[Events API, RTM] The posting permissions for a channel changed.
[Events API, RTM] A channel purpose was updated.
[Events API, RTM] A channel topic was updated.
[Events API, RTM] A channel was unarchived.
[Events API, RTM] Message content redacted due to Enterprise Key Management (EKM).
[RTM] A comment was added to a file.
[Events API, RTM] A file was shared into a channel.
[RTM] A file was mentioned in a channel.
[RTM] A group was archived.
[RTM] A member joined a group.
[RTM] A member left a group.
[RTM] A group was renamed.
[RTM] A group purpose was updated.
[RTM] A group topic was updated.
[RTM] A group was unarchived.
[Events API, RTM] A /me message was sent.
[Events API, RTM] A message was changed.
[Events API, RTM] A message was deleted.
[Events API, RTM] A message thread received a reply.
[RTM] An item was pinned in a channel.
@Deprecated (No longer served) A message thread's reply was broadcast to a channel.
[Events API, RTM] A message thread's reply was broadcast to a channel.
[RTM] An item was unpinned from a channel.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
blockObject object types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ResponseTypeEphemeral ephemeral response for slash commands.
ResponseTypeInChannel in channel response for slash commands.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WEBAPIURLFormat ...

# Variables

EventMapping holds a mapping of event names to their corresponding struct implementations.

# Structs

AccessLogParameters contains all the parameters necessary (including the optional ones) for a GetAccessLogs() request.
No description provided by the author
AccountsChangedEvent represents the accounts changed event.
AckErrorEvent i.
AckMessage is used for messages received in reply to other messages.
ActionBlock defines data that is used to hold interactive elements.
ActionCallback is a convenience struct defined to allow dynamic unmarshalling of the "actions" value in Slack's JSON response, which varies depending on block type.
No description provided by the author
No description provided by the author
AppHome is a group of settings that describe the App Home configuration.
AssistantThreadPrompt is a suggested prompt for a thread.
AssistantThreadSetStatusParameters are the parameters for AssistantThreadSetStatus.
AssistantThreadSetSuggestedPromptsParameters are the parameters for AssistantThreadSetSuggestedPrompts.
AssistantThreadSetTitleParameters are the parameters for AssistantThreadSetTitle.
Attachment contains all the information for an attachment.
AttachmentAction is a button or menu to be included in the attachment.
AttachmentActionOption the individual option to appear in action menu.
AttachmentActionOptionGroup is a semi-hierarchal way to list available options to appear in action menu.
AttachmentField contains information for an attachment field An Attachment can contain multiple of these.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AuditLogParameters contains all the parameters necessary (including the optional ones) for a GetAuditLogs() request.
No description provided by the author
No description provided by the author
No description provided by the author
AuthRevokeResponse contains our Auth response from the auth.revoke endpoint.
AuthTestResponse ...
No description provided by the author
No description provided by the author
BlockAction is the action callback sent when a block is interacted with.
No description provided by the author
BlockElements is a convenience struct defined to allow dynamic unmarshalling of the "elements" value in Slack's JSON response, which varies depending on BlockElement type.
No description provided by the author
Blocks is a convenience struct defined to allow dynamic unmarshalling of the "blocks" value in Slack's JSON response, which varies depending on block type.
No description provided by the author
Bot contains information about a bot.
BotAddedEvent represents the bot added event.
BotChangedEvent represents the bot changed event.
BotProfile contains information about a bot.
BotUser is a group of settings that describe bot user configuration.
ButtonBlockElement defines an interactive element that inserts a button.
No description provided by the author
CallBlock defines data that is used to display a call in slack.
CallParticipant is a thin user representation which has a SlackID, ExternalID, or both.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Channel contains information about the channel.
ChannelCreatedEvent represents the Channel created event.
ChannelCreatedInfo represents the information associated with the Channel created event.
ChannelHistoryChangedEvent represents the Channel history changed event.
ChannelInfoEvent represents the Channel info event.
ChannelJoinedEvent represents the Channel joined event.
ChannelRenameEvent represents the Channel rename event.
ChannelRenameInfo represents the information associated with a Channel rename event.
CheckboxGroupsBlockElement defines an element which allows users to choose one or more items from a list of possible options.
No description provided by the author
CommandsChangedEvent represents the commands changed event.
Comment contains all the information relative to a comment.
No description provided by the author
ConfirmationBlockObject defines a dialog that provides a confirmation step to any interactive element.
ConfirmationField are used to ask users to confirm actions.
ConnectedEvent is used for when we connect to Slack.
ConnectingEvent contains information about our connection attempt.
ConnectionErrorEvent contains information about a connection error.
No description provided by the author
ContextBlock defines data that is used to display message context, which can include both images and text.
No description provided by the author
Conversation is the foundation for IM and BaseGroupConversation.
No description provided by the author
No description provided by the author
No description provided by the author
DatePickerBlockElement defines an element which lets users easily select a date from a calendar style UI.
DateTimePickerBlockElement defines an element that allows the selection of both a date and a time of day formatted as a UNIX timestamp.
No description provided by the author
No description provided by the author
DesktopNotificationEvent represents the update event for Desktop Notification.
Dialog as in Slack dialogs https://api.slack.com/dialogs#option_element_attributes#top-level_dialog_attributes.
DialogInput for dialogs input type text or menu.
DialogInputSelect dialog support for select boxes.
DialogInputValidationError is an error when user inputs incorrect value to form from within a dialog.
DialogInputValidationErrors lists the name of field and that error messages.
DialogOpenResponse response from `dialog.open`.
DialogOptionGroup is a collection of options for creating a segmented table.
DialogResponseMetadata lists the error messages.
DialogSelectOption is an option for the user to select from the menu.
DialogSubmissionCallback is sent from Slack when a user submits a form from within a dialog.
DialogTrigger ...
DisconnectedEvent contains information about how we disconnected.
No description provided by the author
Display is a group of settings that describe parts of an app's appearance within Slack.
DividerBlock for displaying a divider line between blocks (similar to <hr> tag in html) More Information: https://api.slack.com/reference/messaging/blocks#divider.
No description provided by the author
DNDUpdatedEvent represents the update event for Do Not Disturb.
No description provided by the author
No description provided by the author
No description provided by the author
Edited indicates that a message has been edited.
EmailDomainChangedEvent represents the email domain changed event.
No description provided by the author
EmailTextInputBlockElement creates a field where a user can enter email data.
EmojiChangedEvent represents the emoji changed event.
No description provided by the author
No description provided by the author
EnterpriseUser is present when a user is part of Slack Enterprise Grid https://api.slack.com/types/user#enterprise_grid_user_objects.
Event contains the event type.
No description provided by the author
EventSubscriptions is a group of settings that describe the Events API configuration.
No description provided by the author
Features is a group of settings corresponding to the Features section of the app config pages.
File contains all the information for a file.
FileBlock defines data that is used to display a remote file.
FileCommentAddedEvent represents the File comment added event.
FileCommentDeletedEvent represents the File comment deleted event.
FileCommentEditedEvent represents the File comment edited event.
FileInputBlockElement creates a field where a user can upload a file.
No description provided by the author
FileUploadParameters contains all the parameters necessary (including the optional ones) for an UploadFile() request.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetConversationInfoInput Defines the parameters of a GetConversationInfo and GetConversationInfoContext function.
No description provided by the author
No description provided by the author
No description provided by the author
GetFilesParameters contains all the parameters necessary (including the optional ones) for a GetFiles() request.
GetReactionsParameters is the inputs to get reactions to an item.
No description provided by the author
GetUserGroupsParams contains arguments for GetUserGroups method call.
GetUserProfileParameters are the parameters required to get user profile.
No description provided by the author
Group contains all the information for a group.
GroupConversation is the foundation for Group and Channel.
GroupCreatedEvent represents the Group created event.
GroupRenameEvent represents the Group rename event.
GroupRenameInfo represents the group info related to the renamed group.
HeaderBlock defines a new block of type header More Information: https://api.slack.com/reference/messaging/blocks#header.
HelloEvent represents the hello event.
History contains message history information needed to navigate a Channel / Group / DM history.
HistoryParameters contains all the necessary information to help in the retrieval of history for Channels/Groups/DMs.
No description provided by the author
Icon is used for bot messages.
Icons XXX: needs further investigation.
IM contains information related to the Direct Message channel.
ImageBlock defines data required to display an image as a block element More Information: https://api.slack.com/reference/messaging/blocks#image.
ImageBlockElement An element to insert an image - this element can be used in section and context blocks only.
IMCreatedEvent represents the IM created event.
IncomingEventError contains information about an unexpected error receiving a websocket event.
Info contains various details about the authenticated user and team.
InputBlock defines data that is used to display user input fields.
InteractionCallback is sent from slack when a user interactions with a button or dialog.
No description provided by the author
Interactivity is a group of settings that describe the interactivity configuration.
InvalidAuthEvent is used in case we can't even authenticate with the API.
InviteSharedToConversationParams defines the parameters for the InviteSharedToConversation and InviteSharedToConversationContext functions.
Item is any type of slack message - message, file, or file comment.
ItemReaction is the reactions that have happened on an item.
ItemRef is a reference to a message of any type.
LatencyReport contains information about connection latency.
ListFilesParameters contains all the parameters necessary (including the optional ones) for a ListFiles() request.
ListReactionsParameters is the inputs to find all reactions by a user.
ListRemoteFilesParameters contains arguments for the ListRemoteFiles method.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Manifest is an application manifest schema.
ManifestMetadata is a group of settings that describe the manifest.
ManifestResponse is the response returned by the API for apps.manifest.x endpoints.
ManifestSlashCommand is a group of settings that describes slash command configuration.
ManifestValidationError is an error message returned for invalid manifests.
ManualPresenceChangeEvent represents the manual presence change event.
MemberJoinedChannelEvent, a user joined a public or private channel.
MemberLeftChannelEvent a user left a public or private channel.
Message is an auxiliary type to allow us to have a message containing sub messages.
MessageTooLongEvent is used when sending a message that is too long.
MobileInAppNotificationEvent represents the update event for Mobile App Notification.
No description provided by the author
Msg contains information about a slack message.
MultiSelectBlockElement defines a multiselect menu, with a static list of options passed in when defining the element.
NumberInputBlockElement creates a field where a user can enter number data.
OAuthConfig is a group of settings that describe OAuth configuration for the app.
OAuthResponse ...
OAuthResponseBot ...
OAuthResponseIncomingWebhook ...
OAuthScopes is a group of settings that describe permission scopes configuration.
OAuthV2Response ...
OAuthV2ResponseAuthedUser ...
OAuthV2ResponseEnterprise ...
OAuthV2ResponseTeam ...
No description provided by the author
OpenIDConnectResponse ...
OptionBlockObject represents a single selectable item in a select menu More Information: https://api.slack.com/reference/messaging/composition-objects#option.
OptionGroupBlockObject Provides a way to group options in a select menu.
OptionGroupsResponse defines the response used for select block typahead.
OptionsResponse defines the response used for select block typahead.
OutgoingErrorEvent contains information in case there were errors sending messages.
OutgoingMessage is used for the realtime API, and seems incomplete.
OverflowBlockElement defines the fields needed to use an overflow element.
Pagination contains pagination information This is different from Paging in that it contains additional details.
Paging contains paging information.
PermalinkParameters are the parameters required to get a permalink to a message.
Ping contains information about a Ping Event.
PlainTextInputBlockElement creates a field where a user can enter freeform data.
Pong contains information about a Pong Event.
PostMessageParameters contains all the parameters necessary (including the optional ones) for a PostMessage() request.
PrefChangeEvent represents a user preferences change event.
PresenceChangeEvent represents the presence change event.
Properties contains the Canvas associated to the channel.
Purpose contains information about the purpose.
RadioButtonsBlockElement defines an element which lets users choose one item from a list of possible options.
RateLimitedError represents the rate limit response from slack.
RateLimitEvent is used when Slack warns that rate-limits are being hit.
ReactedItem is an item that was reacted to, and the details of the reactions.
No description provided by the author
ReactionItem is a lighter-weight item than is returned by the reactions list.
ReconnectUrlEvent represents the receiving reconnect url event.
No description provided by the author
RemoteFile contains all the information for a remote file For more details: https://api.slack.com/messaging/files/remote.
RemoteFileParameters contains required and optional parameters for a remote file.
Reply contains information about a reply for a thread.
ResponseMetadata holds pagination metadata.
RichTextBlock defines a new block of type rich_text.
RichTextInputBlockElement creates a field where allows users to enter formatted text in a WYSIWYG composer, offering the same messaging writing experience as in Slack More Information: https://api.slack.com/reference/block-kit/block-elements#rich_text_input.
No description provided by the author
RichTextPreformatted represents rich_text_quote element type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RTM represents a managed websocket connection.
RTMError encapsulates error information as returned by the Slack API.
RTMEvent is the main wrapper.
RTMResponse encapsulates response details as returned by the Slack API.
ScheduledMessage contains information about a slack scheduled message.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SecretsVerifier contains the information needed to verify that the request comes from Slack.
SectionBlock defines a new block of type section More Information: https://api.slack.com/reference/messaging/blocks#section.
SelectBlockElement defines the simplest form of select menu, with a static list of options passed in when defining the element.
SelectBlockElementFilter allows to filter select element conversation options by type.
No description provided by the author
Settings is a group of settings corresponding to the Settings section of the app config pages.
No description provided by the author
No description provided by the author
Shortcut is a group of settings that describes shortcut configuration.
SlackErrorResponse brings along the metadata of errors returned by the Slack API.
SlackFileObject Defines an object containing Slack file information to be used in an image block or image element.
SlackMetadata https://api.slack.com/reference/metadata.
SlackResponse handles parsing out errors from the web api.
SlashCommand contains information about a request of the slash command.
No description provided by the author
No description provided by the author
SocketModeConnection contains various details about the SocketMode connection.
StarredItemPagination allows for paginating over the starred items.
No description provided by the author
StatusCodeError represents an http response error.
SubteamCreatedEvent represents the Subteam created event.
SubteamCreatedEvent represents the membership of an existing User Group has changed event.
SubteamSelfAddedEvent represents an event of you have been added to a User Group.
SubteamUpdatedEvent represents an event of an existing User Group has been updated or its members changed.
Team contains details about a team.
TeamDomainChangeEvent represents the Team domain change event.
No description provided by the author
No description provided by the author
TeamJoinEvent represents the Team join event.
TeamMigrationStartedEvent represents the Team migration started event.
TeamPrefChangeEvent represents the Team preference change event.
No description provided by the author
No description provided by the author
No description provided by the author
TeamRenameEvent represents the Team rename event.
No description provided by the author
TextBlockObject defines a text element object to be used with blocks More Information: https://api.slack.com/reference/messaging/composition-objects#text.
TextInputElement subtype of DialogInput https://api.slack.com/dialogs#option_element_attributes#text_element_attributes.
TimePickerBlockElement defines an element which lets users easily select a time from nice UI.
No description provided by the author
Topic contains information about the topic.
UnknownBlock represents a block type that is not yet known.
UnknownBlockElement any block element that this library does not directly support.
UnmappedError represents error occurred when there is no mapping between given event name and corresponding Go struct.
UnmarshallingErrorEvent is used when there are issues deconstructing a response.
No description provided by the author
No description provided by the author
UpdateUserGroupsParams contains arguments for UpdateUserGroup method call.
No description provided by the author
URLTextInputBlockElement creates a field where a user can enter url data.
User contains all the information of a user.
UserChangeEvent represents the user change event.
UserDetails contains user details coming in the initial response from StartRTM.
UserGroup contains all the information of a user group.
UserGroupPrefs contains default channels and groups (private channels).
No description provided by the author
No description provided by the author
UserPagination allows for paginating over the users.
UserPrefs carries a bunch of user settings including some unknown types.
No description provided by the author
UserPresence contains details about a user online status.
UserProfile contains all the information details of a given user.
UserProfileCustomField represents a custom user profile field.
UserProfileCustomFields represents user profile's custom fields.
No description provided by the author
No description provided by the author
UserTypingEvent represents the user typing event.
VideoBlock defines data required to display a video as a block element More Information: https://api.slack.com/reference/block-kit/blocks#video.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WorkflowStep is a group of settings that describes workflow steps configuration.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

Block defines an interface all block types should implement to ensure consistency between blocks.
BlockElement defines an interface that all block element types should implement.
No description provided by the author
DialogElement abstract type for dialogs.
IDGenerator provides an interface for generating integer ID values.
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

ActionType type represents the type of action (attachment, block, etc.).
AttachmentActionCallback is sent from Slack when a user clicks a button in an interactive message (aka AttachmentAction) DEPRECATED: use InteractionCallback.
ChannelArchiveEvent represents the Channel archive event.
ChannelDeletedEvent represents the Channel deleted event.
ChannelLeftEvent represents the Channel left event.
ChannelMarkedEvent represents the Channel marked event.
ChannelUnarchiveEvent represents the Channel unarchive event.
CreateUserGroupOption options for the CreateUserGroup method call.
DialogCallback DEPRECATED use InteractionCallback.
FileChangeEvent represents the File change event.
FileCreatedEvent represents the File created event.
FileDeletedEvent represents the File deleted event.
FilePrivateEvent represents the File private event.
FilePublicEvent represents the File public event.
FileSharedEvent represents the File shared event.
FileUnsharedEvent represents the File unshared event.
No description provided by the author
GetUserGroupsOption options for the GetUserGroups method call.
GetUsersOption options for the GetUsers method call.
GroupArchiveEvent represents the Group archive event.
GroupCloseEvent represents the Group close event.
GroupHistoryChangedEvent represents the Group history changed event.
GroupJoinedEvent represents the Group joined event.
GroupLeftEvent represents the Group left event.
GroupMarkedEvent represents the Group marked event.
GroupOpenEvent represents the Group open event.
GroupUnarchiveEvent represents the Group unarchive event.
HeaderBlockOption allows configuration of options for a new header block.
IMCloseEvent represents the IM close event.
IMHistoryChangedEvent represents the IM history changed event.
IMMarkedEvent represents the IM marked event.
IMMarkedHistoryChanged represents the IM marked history changed event.
IMOpenEvent represents the IM open event.
InputType is the type of the dialog input type.
InteractionType type of interactions.
JSONTime exists so that we can have a String method converting the date.
ListStarsOption options for the GetUsers method call.
MessageBlockType defines a named string type to define each block type as a constant for use within the package.
No description provided by the author
MessageEvent represents a Slack Message (used as the event type for an incoming message).
No description provided by the author
No description provided by the author
MsgOption option provided when sending a message.
Option defines an option for a Client.
Client for the slack api.
PinAddedEvent represents the Pin added event.
PinRemovedEvent represents the Pin removed event.
ReactionAddedEvent represents the Reaction added event.
ReactionRemovedEvent represents the Reaction removed event.
No description provided by the author
No description provided by the author
RichTextQuote represents rich_text_quote element type.
No description provided by the author
RTMOption options for the managed RTM.
RTMsgOption allows configuration of various options available for sending an RTM message.
SectionBlockOption allows configuration of options for a new section block.
SelectDataSource types of select datasource.
ShortcutType is a new string type for the available types of shortcuts.
StarAddedEvent represents the Star added event.
No description provided by the author
StarRemovedEvent represents the Star removed event.
Style is a style of Button element https://api.slack.com/reference/block-kit/block-elements#button__fields.
SubteamSelfRemovedEvent represents an event of you have been removed from a User Group.
TextInputOption handle to extra inputs options.
TextInputSubtype Accepts email, number, tel, or url.
UpdateUserGroupsOption options for the UpdateUserGroup method call.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author