Releases: slack-go/slack
v0.23.0
Added
- feat(socketmode): expose socketmode handler
dispatchermethod by @nlopes in #1550 - feat(block): add card and carousel blocks by @nlopes in #1551
- feat(assistant): add username and icon to status update by @charleenwang in #1553
- feat(block): add alert block by @nlopes in #1552
New Contributors
- @charleenwang made their first contribution in #1553
Full Changelog: v0.22.0...v0.23.0
v0.22.0
What's Changed
Added
- OAuth PKCE support -
OAuthOptionCodeVerifieroption forGetOAuthV2Response, plusGenerateCodeVerifier()andGenerateCodeChallenge()helpers (RFC 7636).client_secretis now conditionally omitted when empty in bothGetOAuthV2ResponseContextandRefreshOAuthV2TokenContext. - Manifest scope fields -
BotOptionalandUserOptionalonOAuthScopes. - Rich text styles -
Underline,Highlight,ClientHighlight, andUnlinkonRichTextSectionTextStyle.Stylefield onRichTextSectionUserGroupElement. - Assistant search context -
Sort,SortDir,Before,After,Highlight,IncludeContextMessages,IncludeDeletedUsers,IncludeMessageBlocks,IncludeArchivedChannels,DisableSemanticSearch,Modifiers,TermClausesparameters and new response types (AssistantSearchContextFile,AssistantSearchContextChannel,AssistantSearchContextMessageContext).
Fixed
- socketmode: malformed JSON no longer forces reconnect -
json.SyntaxErrorandjson.UnmarshalTypeErrornow emit anEventTypeIncomingErrorevent and continue reading instead of killing the WebSocket connection. - socketmode:
debug_reconnectsquery param applied correctly - the parameter was silently discarded due to a missingurl.RawQueryassignment. ChannelTypesandContentTypesnow send comma-separated values instead of repeated form keys, matching the convention used by every other method in the library.
Docs
assistant:writescope marked as deprecated in favour ofchat:write.
Full Changelog: v0.21.1...v0.22.0
v0.21.1
v0.21.1
Added
MessageEventchannel type helpers — NewChannelTypeChannel,ChannelTypeGroup,
ChannelTypeIM, andChannelTypeMPIMconstants plusIsChannel(),IsGroup(),IsIM(), and
IsMpIM()convenience methods onMessageEvent. No more comparing raw strings to figure out where a
message came from:
if ev.IsIM() {
// handle direct message
}Fixed
- MessageEvent doc typo — ChannelType documentation listed "mim" instead of the correct "mpim".
- Duplicate attachment/block serialization — MsgOptionAttachments and MsgOptionBlocks were serializing
payloads twice (once for the response-URL JSON path, once for the form POST path). Serialization now
happens once inside formSender.BuildRequestContext. (#1547)
Note
UnsafeApplyMsgOptions no longer includes attachments/blocks keys in the returned values, since marshalling is deferred to send time. This function is documented as unsupported.
v0.21.0
Warning
This release contains multiple breaking changes. Please review the sections below before upgrading.
Breaking changes
Removed APIs
IMstruct removed — UseConversationinstead.IsUserDeletedhas been moved there.Info.GetBotByID,GetUserByID,GetChannelByID,GetGroupByID,GetIMByIDremoved — These were deprecated and returnednilunconditionally. Remove any calls to them.
Signature changes
-
ListReactionsnow uses cursor-based pagination — Returns([]ReactedItem, string, error)instead of([]ReactedItem, *Paging, error).ListReactionsParametersreplacesCount/PagewithCursor/Limit.// Before items, paging, err := api.ListReactions(params) // After items, nextCursor, err := api.ListReactions(params)
-
ListStars/GetStarrednow use cursor-based pagination — Same pattern: returnsstring(next cursor) instead of*Paging.StarsParametersreplacesCount/PagewithCursor/Limit. -
GetAccessLogsnow uses cursor-based pagination — Same pattern: returnsstring(next cursor) instead of*Paging.AccessLogParametersreplacesCount/PagewithCursor/Limit. -
Ack()andSend()now returnerror(Socket Mode) — Large payloads (≥20KB) that Slack silently dropped are now rejected with an error. Existing call sites that ignore the return value still compile.
Type changes
-
WebhookMessage.UnfurlLinks/UnfurlMedia→*bool— Required to distinguish "omit" from "false".// Before msg := slack.WebhookMessage{UnfurlLinks: true} // After t := true msg := slack.WebhookMessage{UnfurlLinks: &t}
-
User.Has2FA→*bool—nilmeans absent/unknown (bot tokens),falsemeans explicitly disabled.
Behavior changes
MsgOptionBlocks()with no arguments now sendsblocks=[]— Previously a silent no-op. If you relied on that, remove the option entirely.adminerror strings now start with lowercase — If you match error content in your code, update your comparisons.
Added
admin.teams.settings.*API support — Full suite:AdminTeamsSettingsInfo,SetDefaultChannels,SetDescription,SetDiscoverability,SetIcon,SetName([#960])BlockFromJSON/MustBlockFromJSON— Create blocks from raw JSON strings, enabling direct use of output from Slack's Block Kit Builder ([#1497])GetOpenIDConnectUserInfo— Returns identity info viaopenid.connect.userInfo([#967])OAuthOptionAPIURLfor package-level OAuth functions — Override the Slack API URL for testing ([#744])- HTTP response headers — Access Slack response headers (
X-OAuth-Scopes,X-Ratelimit-*, etc.) viaOptionOnResponseHeaderscallback ([#1076]) - API warning callbacks — Register
OptionWarnings(func(warnings []string))to receive Slack deprecation notices ([#1540]) DNDOptionTeamID— Passteam_idtoGetDNDInfo/GetDNDTeamInfo, required after workspace migration ([#1157])UpdateUserGroupMembersList— Accepts[]stringinstead of comma-separated string ([#1172])SetUserProfile— Set multiple profile fields in a single API call ([#1158])- RTM events —
user_status_changed,user_huddle_changed,user_profile_changed,sh_room_join,sh_room_leave,sh_room_update,channel_updated([#1541], [#858]) - Socket Mode handlers —
HandleShortcut,HandleViewSubmission,HandleViewClosedfor Level 3 dispatch byCallbackID([#1161]) - New fields —
UsernameonUser([#1218]),Blocks/Attachments/Files/UploadonAppMentionEvent([#961]),BlocksonMessageEvent([#1257]),IsConnectorBot/IsWorkflowBotonUser,GuestInvitedByonUserProfile,CacheTS/EventTSonUserChangeEvent
Fixed
UnknownBlockround-trip data loss — Unrecognized block types now preserve their full JSON through unmarshal/marshal cyclesWorkflowButtonBlockElementmissing fromUnmarshalJSON— Plus missingmulti_*_selectandfile_inputcases ([#1539])NewBlockHeadernil pointer dereference — Passing a nil text object no longer panics ([#1236])ValidateUniqueBlockIDfalse positives — Emptyblock_idstrings no longer flagged as duplicates ([#1184])- Socket Mode: large Ack payloads silently failing — Now uses 32KB write buffer and rejects payloads ≥20KB with an error ([#1196])
Deprecated
slackevents.ParseActionEvent— Cannot parseblock_actions. Useslack.InteractionCallbackwithjson.Unmarshalinstead ([#596])slackevents.MessageAction,MessageActionEntity,MessageActionResponse— Legacyinteractive_messagetypes only
Full Changelog: v0.20.0...v0.21.0
v0.20.0
Warning
trigger_id and workflow_id are NOT in any documentation or in any of the official
libraries, so exercise caution if you use these.
Added
workflow_idandtrigger_idinMessage— It seems that some types of messages,
e.g:bot_message, can carrytrigger_idandworkflow_id.WorkflowIDwas added by @clayallsopp in #1537RichTextQuote.Borderfield — optional border toggle (matches the docs now)RichTextPreformatted.Languagefield — enables syntax highlighting for preformatted
blocks
Fixed
- Remove embedding of
RichTextSection—RichTextQuoteandRichTextPreformatted
are now flattened as they should have always been. This is a breaking change for anyone
using these structs directly.
New Contributors
- @clayallsopp made their first contribution in #1537
Full Changelog: v0.19.0...v0.20.0
v0.19.0
Added
- Add support for task_card and plan agent blocks by @nlopes in #1536
- Add optional HTTP retry for Web API (429, 5xx, connection errors) by @olegbespalov in #1532
Full Changelog: v0.18.0...v0.19.0
v0.18.0
This is the first stable release in the 0.18.x series — it includes everything from rc1 and rc2 plus a handful of new features and fixes that landed since.
There are a few breaking changes in this one. I tried to keep them to the minimum necessary but some were long overdue. Here's what you need to know.
Breaking changes
File upload API cleanup (#1481)
Slack discontinued the old files.upload API back in November 2025, so we finally removed the deprecated UploadFile, UploadFileContext, and FileUploadParameters. The V2 variants have been renamed to drop the suffix:
UploadFileV2→UploadFileUploadFileV2Context→UploadFileContextUploadFileV2Parameters→UploadFileParameters
Should be a quick search-and-replace for most codebases.
GetReactions return type (#1480)
GetReactions now returns ReactedItem instead of []ItemReaction. This aligns with what the Slack API actually returns — the item itself (message, file, or file_comment) alongside its reactions. To migrate, use resp.Reactions to get at the slice.
Settings pointer fields (#1461)
Settings.Interactivity and Settings.EventSubscriptions are now pointers so they can be properly omitted when empty. You'll need nil checks if you're accessing these directly.
Minimum Go version is now 1.25
Up from 1.22 in v0.17.x. The go.mod directive is go 1.25.
Added
- Admin Conversations API — Full
admin.conversations.*support: core operations, bulk operations, preferences, retention, restrict access, and EKM channel info. (#1329) admin.roles.*API methods —listAssignments,addAssignments, andremoveAssignments. (#1520)- Chat Streaming API — Real-time chat streaming with example usage. (#1506)
- Data Access API — Full support with example implementation. (#1439)
- Work Objects — Chat unfurl with Work Object metadata, entity details (flexpane),
entity_details_requestedevent, and associated types. (#1529) - Huddle support —
HuddleRoom,HuddleParticipantEvent, andHuddleRecordingtypes for huddle events. - Table blocks — Parse and create table blocks. (#1490, #1511)
- Context actions block —
context_actionsblock type. (#1495) - Workflow button —
workflow_buttonblock element. (#1499) - Call block data —
CallBlocknow includes full call data. (#897) - Cursor-based
GetUserspagination (#1465) GetAllConversationswith pagination — Automatic pagination with rate limit handling. (#1463)focus_on_loadfor remaining block elements — selects, multi-selects, datepicker, timepicker, plain_text_input, checkboxes, radio_buttons, number_input. (#1519)- Missing
User/UserProfile/EnterpriseUserfields —who_can_share_contact_card,always_active,pronouns,image_1024, and more. (#1526) PlainText/PreviewPlainTextonFile— Email file objects now include plain text body fields. (#1522)- Attachment image fields —
ImageBytes,ImageHeight,ImageWidth. (#1516) RecordChannelconversation property (#1513)- Title for
CreateChannelCanvas(#1483) loading_messagesforSetAssistantThreadsStatus(#1489)PostEphemeralhandler for slacktest (#1517)PreviewImageNamefor remote files- Audit Logs example (#1144)
Fixed
- File upload error wrapping —
UploadFilenow tells you which of the three upload steps failed. (#1491) - Audit Logs API endpoint —
GetAuditLogswas hitting the wrong endpoint; now usesapi.slack.com. AddedOptionAuditAPIURLfor testing. (#1144) - Socket mode dial debugging — Debug logging for custom dialer failures. Helps with proxy/TLS issues. (#1360)
MsgOptionPostMessageParametersmetadata — Was silently droppingMetaData. (#1343)UserProfile.SkypeJSON tag — Fixed typo"skyp"→"skype". (#1524)assistant.threads.setSuggestedPromptstitle — Now actually sent when non-empty. (#1528)PublishViewempty hash — No longer sends empty hash in payload. (#1515)ImageBlockElementvalidation — Properly validatesimageURLorSlackFile. (#1488)- Rich text section channel return (#1472)
KickUserFromConversationerror handling — Errors now parsed as a map. (#1471)
Changed
- CI test matrix: dropped Go 1.24, added Go 1.26; bumped golangci-lint to v2.10.1. (#1530)
Full Changelog: v0.17.3...v0.18.0
v0.18.0-rc2
⚠️ Breaking Changes
- Removed deprecated
UploadFile,UploadFileContext, andFileUploadParameters. Thefiles.uploadAPI was discontinued by Slack on November 12, 2025. ([#1481]) - Renamed
UploadFileV2→UploadFile,UploadFileV2Context→UploadFileContext, andUploadFileV2Parameters→UploadFileParameters. The "V2" suffix is no longer needed now that the old API is removed. ([#1481])
Added
- Audit Logs example - New example demonstrating how to use the Audit Logs API. ([#1144])
- Admin Conversations API support - Comprehensive support for
admin.conversations.*
methods including core operations (archive, unarchive, create, delete, rename, invite,
search, lookup, getTeams, convertToPrivate, convertToPublic, disconnectShared, setTeams),
bulk operations (bulkArchive, bulkDelete, bulkMove), preferences, retention management,
restrict access controls, and EKM channel info. ([#1329])
Changed
- BREAKING: Removed deprecated
UploadFile,UploadFileContext, and
FileUploadParameters. Thefiles.uploadAPI was discontinued by Slack on November
12, 2025. ([#1481]) - BREAKING: Renamed
UploadFileV2→UploadFile,UploadFileV2Context→
UploadFileContext, andUploadFileV2Parameters→UploadFileParameters. The "V2"
suffix is no longer needed now that the old API is removed. ([#1481])
Fixed
- File upload error wrapping -
UploadFilenow wraps errors with the step name
(GetUploadURLExternal,UploadToURL, orCompleteUploadExternal) so callers can
identify which of the three upload steps failed. ([#1491]) - Audit Logs API endpoint - Fixed
GetAuditLogsto use the correct endpoint
(api.slack.com) instead of the regular API endpoint (slack.com/api). The Audit
Logs API requires a different base URL. AddedOptionAuditAPIURLfor testing. ([#1144]) - Socket mode websocket dial debugging - Added debug logging when a custom dialer is
used including HTTP response status on dial failures. This helps diagnose proxy/TLS
issues like "bad handshake" errors. ([#1360]) MsgOptionPostMessageParametersnow passesMetaData- Previously, metadata was
silently dropped when usingPostMessageParameters. ([#1343])
Full Changelog: v0.18.0-rc1...v0.18.0-rc2
v0.18.0-rc1
This is a release candidate for v0.18.0. Please test and report any issues.
⚠️ Breaking Changes
GetReactionsnow returnsReactedIteminstead of[]ItemReaction. To migrate, useresp.Reactionsto access the slice of reactions. (#1480)Settingsstruct fieldsInteractivityandEventSubscriptionsare now pointers, allowing them to be omitted when empty. (#1461)- Minimum Go version bumped to 1.24. (#1504)
Added
- Huddle support (
HuddleRoom,HuddleParticipantEvent,HuddleRecording) forhuddle_threadevents - Call block data parsing with
CallBlockData,CallBlockDataV1,CallBlockIconURLs(#897) - Chat Streaming API (#1506)
- Data Access API (#1439)
- Cursor-based pagination for
GetUsers(#1465) GetAllConversationswith automatic pagination (#1463)- Table blocks support (#1490, #1511)
- Context actions block (#1495)
- Workflow button block element (#1499)
loading_messagesparameter forSetAssistantThreadsStatus(#1489)- Attachment image fields:
ImageBytes,ImageHeight,ImageWidth(#1516) RecordChannelconversation property (#1513)- Title argument for
CreateChannelCanvas(#1483) PostEphemeralhandler for slacktest (#1517)PreviewImageNamefor remote files
Fixed
PublishViewno longer sends empty hash (#1515)ImageBlockElementvalidation (#1488)- Rich text section channel return (#1472)
KickUserFromConversationerror handling (#1471)
All PRs
- Make it possible to omit fields in the manifest Settings struct by @pmarkowsky in #1461
- Get all conversations with pagination by @dorkauf in #1463
- fix:
KickUserFromConversationerrors as a map by @nlopes in #1471 - fix: ensure we return channel for section channel rich text by @nlopes in #1472
- chore(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.0 by @dependabot[bot] in #1469
- feat: add cursor-based pagination support for user retrieval by @KamikazeZirou in #1465
- chore(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #1467
- chore(deps): bump actions/setup-go from 5 to 6 by @dependabot[bot] in #1477
- chore(deps): bump actions/stale from 9.1.0 to 10.0.0 by @dependabot[bot] in #1478
- support Data Access API by @nktks in #1439
- chore(deps): bump actions/stale from 10.0.0 to 10.1.0 by @dependabot[bot] in #1484
- feat: add support for optional "loading_messages" parameter in SetAssistantThreadsStatus by @VDVsx in #1489
- chore(deps): bump golangci/golangci-lint-action from 8.0.0 to 9.0.0 by @dependabot[bot] in #1492
- feat: add mise.toml by @tgvashworth in #1496
- Add support for table blocks by @williamclot in #1490
- feat: add support for context_actions block by @tgvashworth in #1495
- fix: ensure imageURL or SlackFile for ImageBlockElement by @nhsieh in #1488
- feat: add support for workflow_button as a block element by @nlopes in #1499
- chore(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in #1502
- chore(deps): bump golangci/golangci-lint-action from 9.0.0 to 9.1.0 by @dependabot[bot] in #1501
- ci,fix: bump base go version to 1.24 by @nlopes in #1504
- ci: fix lint step by @nlopes in #1505
- docs(conversation): update GetConversationHistory function comments by @yatiac in #1507
- Adds Chat Streaming API Support by @k-k in #1506
- chore(deps): bump actions/stale from 10.1.0 to 10.1.1 by @dependabot[bot] in #1508
- chore(deps): bump golangci/golangci-lint-action from 9.1.0 to 9.2.0 by @dependabot[bot] in #1509
- feat: handle unmarshal table block by @chinathaip in #1511
- Add RecordChannel to conversation Properties by @chigley in #1513
- Add support for title argument in CreateChannelCanvas method by @jarospisak-unity in #1483
- feat: Align
GetReactionswith Slack API by @olegbespalov in #1480 - fix(views): don't send empty hash with PublishView by @nlopes in #1515
- feat(attachments): add ImageBytes, ImageHeight and ImageWidth by @nlopes in #1516
- adds postephemeral handler to slacktest to audit outgoing messages by @nlopes in #1517
New Contributors
- @pmarkowsky made their first contribution in #1461
- @KamikazeZirou made their first contribution in #1465
- @nktks made their first contribution in #1439
- @VDVsx made their first contribution in #1489
- @tgvashworth made their first contribution in #1496
- @williamclot made their first contribution in #1490
- @nhsieh made their first contribution in #1488
- @yatiac made their first contribution in #1507
- @k-k made their first contribution in #1506
- @chinathaip made their first contribution in #1511
- @chigley made their first contribution in #1513
- @olegbespalov made their first contribution in #1480
Full Changelog: v0.17.3...v0.18.0-rc1
v0.17.3
What's New
Fixes
- Parse simple string based errors as part of the response by @nlopes in #1452
In the previous version we introduced the ability to parse specific errors (more complex ones) but Slack can still send us astring.stringis now the fallback type.
Other
- Examples are now using environment variables and command line arguments consistently by @nlopes in #1456
Also added a ./examples/README.md explaining the patterns that should be used.
Full Changelog: v0.17.2...v0.17.3