NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet
NuGet, #2090 most downloaded on NuGet
A comprehensive Slack API client for .NET
Latest stable
0.20.0
Last release 21 days ago
01 Nov 2026
Release timing varies
gaps range from 2 weeks to 5 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
100 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Removed ISlackTypeResolver, along with UseTypeResolver, ISlackServiceProvider.GetTypeResolver, SlackServiceBuilder.GetTypeResolver, Default.SlackTypeR
ISlackTypeResolver, along with UseTypeResolver, ISlackServiceProvider.GetTypeResolver, SlackServiceBuilder.GetTypeResolver, Default.SlackTypeResolver and Default.AssembliesContainingSlackTypes. Default.JsonSettings no longer takes a type resolver. Use ReplaceSlackType or RegisterSlackType to deserialize your own types.ReplaceSlackType<TSlackType, TReplacement>() deserializes your own type wherever SlackNet would create one of its own, so you can add properties SlackNet doesn't have yet.RegisterSlackType<TSlackType>(typeIdentifier) deserializes Slack types that SlackNet doesn't have yet.RegisterFunctionHandler handles executions of a single custom function by callback ID, with optional typed input values.AgentSessionTitleChanged event.ContextTeamId, Updated, IsOpen, IsFrozen, SharedTeamIds, InternalTeamIds, ConnectedTeamIds and PendingConnectedTeamIds on Conversation.UserTeam, SourceTeam, DisplayAsBot, MediaDisplayType and HasMoreShares on File.IsEmailConfirmed, WhoCanShareContactCard and IsWorkflowBot on User, and DisplayNameNormalized, Image1024 and IsCustomImage on UserProfile.ParentUserId and Subscribed on MessageEvent.ContextTeamId and ContextEnterpriseId on EventCallback, and IsEnterpriseInstall on Authorization.Team and Enterprise on MemberJoinedChannel, and Team on MemberLeftChannel.channel_archive, channel_unarchive, group_archive and group_unarchive events are deserialized as ChannelArchive, ChannelUnarchive, GroupArchive and GroupUnarchive events, rather than as message subtypes.Thankyou to @we4sz for his help with this release 💪
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Both of these required some subtle breaking changes, so be sure to check the section below.
This release adds support for custom workflow functions and dynamic credential providers (which should make it easier to support multiple Slack apps and workspaces). Both of these required some subtle breaking changes, so be sure to check the section below.
Custom step functions that return dynamic options need to complete before acknowledging the event, so I've introduced an experimental IEventHandler<T> interface, which provides access to the typed event, the EventCallback, and a manual Acknowledge function. This can be used for any event type though, so you might find it useful outside of custom step functions.
UseApiTokenProvider for Web API requests.UseAppLevelTokenProvider for app-level API requests.UseSigningSecretProvider and UseVerificationTokenProvider for ASP.NET Core request validation.SlackRequestContext. API token providers also receive the API method, arguments and originating request.FunctionExecuted event.FunctionsApi.CompleteSuccess and CompleteError.FunctionDistributionPermissionsApi.FunctionWorkflowStepsApi, including form-response exports.WorkflowsFeaturedApi and WorkflowTriggerPermissionsApi.ViewsApi.Open and Push.AgentsSessionsApi.SetStatus and AgentSessionStopped.StopStream also supports setting the agent session status.TaskCardBlock, PlanBlock, CardBlock, CarouselBlock, ContainerBlock, AlertBlock, DataTableBlock and DataVisualizationBlock, with supporting icons, URL sources and chart types.RawNumberCell and RichTextPreformatted.Language.AppContextChanged, AppHomeOpened.Context and MessageEvent.AppContext.MessageDeleted.PreviousMessage, and UserTeam and SourceTeam to message events.MetadataJson and MetadataObject to MessageUpdate.BotId and EnterpriseId to AuthTestResponse.codeVerifier to OAuthV2Api.Access for PKCE.AssistantThreadsApi.SetSuggestedPrompts overload without a thread timestamp, for the Messages tab.ISlackApiClient.AppsConnectionsApi to AppsConnections.SlackEndpointConfiguration:
UseSigningSecret, VerifyWith, UseEventUrlVerification and UseSocketMode into the AddSlackNet callback.UseSocketMode.MapToPrefix and DelayResponse in UseSlackNet. UseSocketMode now returns the service configuration.ISlackRequestValidationConfiguration. Custom validation configuration should use ISlackSigningSecretProvider and/or ISlackVerificationTokenProvider.null or an empty string now reject requests.ReplaceEventHandling, ISlackHandlerFactory.CreateEventHandler and SlackRequestContext.EventHandlers now use SlackNet.Handlers.Experimental.IEventHandler<Event>. Implement Handle(IEventContext<Event>), or adapt existing handlers with .ToEventHandler(). Existing RegisterEventHandler registrations continue to work.ISlackServiceProvider implementations must provide GetApiTokenProvider() and GetAppLevelTokenProvider().cancellationToken in OAuthV2Api.Access and ChatApi.StartStream, AppendStream and StopStream. Pass cancellation tokens by name, e.g. cancellationToken: token, and rebuild dependent projects.SlackRequestContext.RequestId through its initializer; setting the corresponding dictionary entry no longer updates it.ViewsApi.Open and Push overloads. Use Open(view, triggerId: triggerId) and Push(view, triggerId: triggerId).SlackApiClient constructor accepting HTTP dependencies and a token string. Use the constructor accepting separate API-token and app-level-token providers.A big thanks to @enhancer13, @vgribok-aws, and @we4sz for their help with this release 🥳
More robust connection handling for socket mode - fixes an issue where socket mode could silently stop working after connections failed.
ISlackSocketModeClient and ICoreSocketModeClient:
IAsyncDisposable.DisconnectAsync() method.Disconnect() marked as obsolete.Added RichTextAttachmentMention element.
Thankyou to @AlexanderMakarov124 for this release 🌟
Added UseSocketMode to config in AddSlackNet callback and deprecated it inside UseSlackNet.
UseSocketMode to config in AddSlackNet callback and deprecated it inside UseSlackNet.Removed dependency on Microsoft.Bcl.AsyncInterfaces on .NET 8.
Microsoft.Bcl.AsyncInterfaces on .NET 8.loadingMessages parameter to AssistantThreadsApi.SetStatus.Thankyou to @verdie-g for his help with this release 👍
Added FeedbackButtonsAction and IconButtonAction types.
FeedbackButtonsAction and IconButtonAction types.Changed Attachment.IsAppUnfurl to a nullable bool to align with other bool properties.
Attachment.IsAppUnfurl to a nullable bool to align with other bool properties.Added StartStream, AppendStream, and StopStream methods to ChatApi.
StartStream, AppendStream, and StopStream methods to ChatApi.Info method to AssistantSearchApi.ToolingApi with RotateToken method.EntityApi with PresentDetails method.EntityDetailsRequested event.ChatApi.Unfurl and Chat.PostMessage methods.Remaining methods in ListItemsApi
ListApiListAccessApiListDownloadApiListItemsApiContextActionsBlock and TableBlock block types.The ListItemsResponse class has been moved from the SlackNet namespace to the SlackNet.WebApi namespace to align with other response classes.
Fixed doubling up of '/' at beginning of path when RoutePrefix is empty.
RoutePrefix is empty.ErrorResponse.Info ignores properties that aren't strings, rather than throwing an exception.
ErrorResponse.Info ignores properties that aren't strings, rather than throwing an exception.Removed deprecated asUser parameter from ChatApi.Delete.
SlackExceptions thrown when Slack returns an error response.asUser parameter from ChatApi.Delete.ToDateTime and ToTimestampNumber extensions for converting between long timestamps and DateTimes.RichTextDate.Timestamp to a long and added Date wrapper property.Thankyou to @harayuu9 for this release ➕
Canvas to FileType enum.Thankyou to @harayuu9 for this release ➕
Removed support for workflow steps, which were deprecated nearly a year ago.
AssistantSearchApiCanvasesApiExternalTeamsApiListItemsApiConversationsApi:
CreateCanvasSetExternalInvitePermissionsApproveRequestedShareInviteDenyRequestedShareInviteListRequestedShareInvitesteamId and showFilesHiddenByLimit parameters to FilesApi.List.OAuthV2Api.Exchange method.UsersApi.LookupDiscoverableContact method.BookmarksApi.Edit calls the correct Slack API method.Removed support for workflow steps, which were deprecated nearly a year ago.
Thankyou to @ynaftali-island for his help with this release 💪
Fewer dependencies on .NET 8 and above.
AuthApi.TeamsList method.InvalidOperationException error that occurred when a web socket connection was closed after another error.Thankyou to @Hawxy and @ynaftali-island for their contributions to this release 🥳
Fixed web socket reconnection when Slack closes the connection.
This release replaces the web socket implementation, which should fix socket mode in .NET Framework.
This release replaces the web socket implementation, which should fix socket mode in .NET Framework.
WebSocketWrapper constructor now takes in a System.Net.WebSockets ClientWebSocket and uri string.IWebSocket.Send now returns a Task.ICoreSocketModeClient.Send now returns a Task.Added Expand property to SectionBlock.
Expand property to SectionBlock.MarkdownBlock type.Added includeAllMetadata parameter to ConversationsApi.Replies.
includeAllMetadata parameter to ConversationsApi.Replies.Fixed issue where calling FilesApi.CompleteUploadExternal manually would flip the threadTs and initialComment arguments.
FilesApi.CompleteUploadExternal manually would flip the threadTs and initialComment arguments.Fixing the name of OpenIdApi.Token's redirect_uri parameter.
OpenIdApi.Token's redirect_uri parameter.AssistantThreadStarted and AssistantThreadContextChanged events.AssistantThreadsApi with SetStatus, SetSuggestedPrompts, and SetTitle methods.AssistantAppThread message event, which appears in MessageChanged events.PreviousMessage property to MessageChanged event.Thankyou to @brb3 for his help with this release 🛠️
Added microseconds to DateTimes produced by the ToDateTime helper. This makes sorting messages by timestamp more reliable, but Ts strings should still
DateTimes produced by the ToDateTime helper. This makes sorting messages by timestamp more reliable, but Ts strings should still be used to identify messages, rather than using DateTimes.CancellationToken parameters are no longer nullable. They're still optional, so this should only affect code that was explicitly using CancellationTok
CancellationToken parameters are no longer nullable. They're still optional, so this should only affect code that was explicitly using CancellationToken?.
If you were previously passing in a nullable CancellationToken, I'd recommend null-coalescing to either default or CancellationToken.None.
If you were specifying the type in testing mocks, e.g. with Arg.Any<CancellationToken?>() or It.IsAny<CancellationToken?>(), simply remove the ?. If you were passing in null in tests, replace it with default or CancellationToken.None. If you were asserting that null was passed in as the cancellation token, it should be fine to assert on CancellationToken.None instead.
Deprecated Utils.RetryWithDelay - this was never meant to be public.
UseSocketMode properly disconnects the socket mode client when app is shut down.Utils.RetryWithDelay - this was never meant to be public.IWebSocket interface and made Open async.SlackEndpointConfiguration.SocketModeConnectionOptions setter - the options should be passed into UseSocketMode instead.Updating some dependencies to avoid vulnerable packages:
Fixed UserProfile deserialization by changing UserProfile.StatusEmojiDisplayInfo to a list.
UserProfile deserialization by changing UserProfile.StatusEmojiDisplayInfo to a list.Unicode property to EmojiDisplayInfo.Support for new file upload APIs
GetUploadUrlExternal and CompleteUploadExternal methods to FilesApi.Upload overloads that take advantage of new upload APIs (see below). The old overloads have been marked as obsolete in favour of the new methods.IHttp parameter to FilesApi constructor. The old constructor has been marked as obsolete, and will use the default IHttp implementation.StatusEmojiDisplayInfo, StatusTextCanonical, Pronouns, and StartDate properties to UserProfile.ThreadBroadcast event. This replaces ReplyBroadcast, which will now work again, but has been marked as obsolete.Slack's new upload API requires at least 3 requests: 1 to get a URL to upload to, 1 to upload the file to that URL, and 1 to complete the upload operation, and the first 2 of those must be repeated for each file being uploaded together.
SlackNet provides two new Upload methods that handle these requests for you, providing an API similar to the old upload API. These Upload methods take in either a single FileUpload object or an IEnumerable of them, allowing you to specify the file contents in a number of formats, and return references to the uploaded files in Slack. The GetUploadUrlExternal and CompleteUploadExternal methods are provided for completeness, but using Upload is recommended.
Added RichTextList.Offset property.
RichTextList.Offset property.RichTextQuote.Border property.RichTextPreformatted.Border property.Highlight, ClientHighlight, and Unlink properties to RichTextStyle.RichTextStyle properties aren't serialized if they're false.RichTextList.Elements only accepts RichTextSections.RichTextList.Style changed from a string to RichTextListStyle enum.Error messages returned from Slack are included in SlackException's message.
SlackException's message.Added SlackFile property to Image element and ImageBlock.
SlackFile property to Image element and ImageBlock.Format property to RichTextDate.FileInput block element.Added experimental option in UseSlackNet to delay responses until after handlers have completed.
UseSlackNet to delay responses until after handlers have completed.ChatApi.PostEphemeral correctly returns PostEphemeralResponse instead of PostMessageResponse.
ChatApi.PostEphemeral correctly returns PostEphemeralResponse instead of PostMessageResponse.SlackNet.AzureFunctions package to properly support running in Azure Functions.Hosting a SlackNet application in Azure Functions is now properly supported with the new SlackNet.AzureFunctions package. Configuration is similar to previous Azure Functions integration with SlackNet.AspNetCore, but the APIs have been simplified, and the isolated worker model is now supported. Additionally, some issues around the function shutting down before a request has finished being handled have been resolved, albeit at the cost of dropping support for early responses (responses will be sent after you've finished handling the request, no matter how early you respond). See the readme and AzureFunctionsExample project for more information.
VerifyWith, UseSigningSecret, and UseEventUrlVerification, called inside UseSlackNet, have been marked as obsolete, and will be removed in a future release. These calls should now be made in AddSlackNet instead.AddSlackNet now takes in an AspNetSlackServiceConfiguration instead of a ServiceCollectionSlackServiceConfiguration. The API is otherwise compatible.Microsoft.AspNetCore.Http and Microsoft.AspNetCore.Http.Abstractions dependencies have been bumped to versions 2.1.22 and 2.1.1 respectively.ISlackRequestHandler no longer take in a SlackEndpointConfiguration. The configuration is now injected into the implementation.SlackResult no longer implements IActionResult.If you're currently using SlackNet.AspNetCore with Azure Functions, you'll need to switch to SlackNet.AzureFunctions, and make the following changes:
AddSlackNet extension from SlackNet.AzureFunctions.SlackEndpointConfiguration configuration into AddSlackNet, and remove its service collection registration.ISlackRequestHandler and SlackEndpointConfiguration from your endpoints class with just ISlackFunctionRequestHandler, and update its usage to remove the second argument from each method call.Task<SlackResult> to Task<SlackFunctionResult>.See the AzureFunctionsExample project for an example.
Thankyou to @matthawley for his help with this release 💪
Fix for invalid parameter error when using an ExternalMultiSelectMenu.
ExternalMultiSelectMenu.Thankyou to @rzezak for this release 🐞🔨
Added View property to BlockOptionsRequest.
View property to BlockOptionsRequest.includeAllMetadata parameter to IConversationsApi.History.cursor and/or CancellationToken to IConversationsApi.History as positional arguments, you'll need to either add false as the includeAllMetadata argument, or specify the cursor/cancellationToken parameter names.Thankyou to @nimoskov for his help with this release ✨
Added optional teamId parameter to IConversationsApi.Create.
teamId parameter to IConversationsApi.Create.MessageMetadataPosted, MessageMetadataUpdated, and MessageMetadataDeleted events.BotId, AppId, and BotProfile properties to MessageEvent.TeamId, Deleted, and Updated properties to BotInfo.RichTextInput and fixed posting messages with RichTextBlocks.When posting a message to Slack, you can specify the metadata in one of two ways:
await slack.Chat.PostMessage(new Message
{
Channel = "#general",
Text = "My message",
// Use your own metadata object. It will be serialized with the standard Slack conventions,
// and the event_type will be the name of the class in snake case.
MetadataObject = new MyMetadata("my info"),
// Specify the metadata JSON explicitly. This will take precedence over MetadataObject.
MetadataJson = new MessageMetadata
{
EventType = "my_metadata",
EventPayload = JToken.Parse("""{ "custom_info": "my info" }""") // Get your JToken from wherever you like
}
});
Messages retrieved from Slack will have a Metadata property that contains the event type and JSON as a JToken. To deserialize the JSON using the standard Slack JSON conventions, use the ToObject method on MessageMetadata, not the ToObject method on JToken:
var myMetadata = message.Metadata.ToObject<MyMetadata>();
CancellationToken to IConversationsApi.Create as a positional argument, you'll need to either add null as the teamId argument, or specify the cancellationToken parameter name.SlackJsonSettings parameter to the ChatApi constructor. If you're constructing ChatApi manually, you can pass in Default.JsonSettings(), or your own customized settings.InitialValue property of TextInput down to its sub-classes, to account for RichTextInput's different type of value.Thankyou to @jtsai-osa for his help with this release 👍
Renamed SnoozeEndTime on SnoozeResponse and OwnDndResponse so it deserializes properly.
SnoozeEndTime on SnoozeResponse and OwnDndResponse so it deserializes properly.SnoozeIsIndefinite to SnoozeResponse and OwnDndResponse.Added missing IsExtSharedChannel property to EventCallback.
IsExtSharedChannel property to EventCallback.SlackNet.AspNetCore.SlackNet.Error instead of just SlackNet).When using the default logger with ASP.NET, individual SlackNet log categories can be enabled in appsettings.json with:
"Logging": {
"LogLevel": {
"SlackNet.Data": "Trace",
"SlackNet.Serialization": "Trace",
"SlackNet.Internal": "Debug",
"SlackNet.Request": "Information",
"SlackNet.Error": "Error"
}
}
Setting a category to a higher level will filter out logs from that category.
Added the UserHuddleChanged, UserProfileChanged, and UserStatusChanged events.
UserHuddleChanged, UserProfileChanged, and UserStatusChanged events.LogEvents in the Serialization category.Attachments property to MessageSearchResult.Unsafe property to RichTextLink.ThumbWidth, ThumbHeight, OriginalUrl, ServiceName, and ServiceIcon properties to Attachment.Thankyou to @fstojanac for his help with this release 💪
Added cursor-based pagination to TeamApi.AccessLogs and FilesApi.List.
TeamApi.AccessLogs and FilesApi.List.ChatApi.PostEphemeral can post to threads.Thankyou to @arkolka for their help with this release 🎉
Added FileIds to MessageUpdate to allow removing and re-adding files when updating a message.
FileIds to MessageUpdate to allow removing and re-adding files when updating a message.SlackApiClient.WithAccessToken() maintains the value of DisableRetryOnRateLimit.Added HuddleState and HuddleStateExpirationTs properties to UserProfile.
HuddleState and HuddleStateExpirationTs properties to UserProfile.Thankyou to @JoeMyers for this release ➕
Fixed content type of event endpoint challenge.
Thankyou to @SamuelCharest for his help with this release 🛠️
Added Link.Email helper method for creating email links.
Link.Email helper method for creating email links.PostToWebhook method to SlackApiClient for posting messages to incoming webhooks.IncomingWebhook property to OauthV2AccessResponse for collecting generated webhook URLs.Thankyou to @TimSon777 for his help with this release 👍
Fixed deserialization of MessageBlocks property in attachments.
MessageBlocks property in attachments.DatePicker.FocusOnLoad property isn't serialized when false, to avoid a Slack internal error.DateTimePicker, EmailTextInput, UrlTextInput, and NumberInput block elements.Thanks again to @theteladras for his help with this release 🤝
Added Border property to RichTextList.
Border property to RichTextList.Search API response deserialization by changing from MessageEvents to new MessageSearchResponse class.Thank you to @theteladras for his help with this release ✨
Added ApiAppId property to UserProfile.
ApiAppId property to UserProfile.Thankyou to @theteladras and @omer-koren for this release 🥇
Added Unicode and SkinTone properties to RichTextEmoji.
Unicode and SkinTone properties to RichTextEmoji.PinnedTo and PinnedInfo properties to MessageEvent.DeleteScheduledMessage method to ChatApi.ScheduledMessage.Id and added missing Text property.EnterpriseId property to EventCallback.TeamAccessGranted and TeamAccessRevoked events.Http service will correctly log requests.Many thanks to @theteladras, @omer-koren, @magnusfox, and @henkli for their help with this release 🥳
SlashCommand.TeamName renamed to TeamDomain to match Slack's JSON.
SlashCommand.TeamName renamed to TeamDomain to match Slack's JSON.DataSource property added to SelectElement.Thankyou to @ngg for this release ✨
Added team billing & preferences APIs.
Added Attachment properties that appear on message unfurls (shared messages).
Attachment properties that appear on message unfurls (shared messages).Thankyou to @omer-koren for this release ✌️
Fixed deserialization of EmojiApi.List's response so emojis are returned properly.
EmojiApi.List's response so emojis are returned properly.DndApi.TeamInfo's response so users' DnD statuses are returned properly.Thanks to @omer-koren for his help with this release 🛠️
Added State to BlockActionRequest for when request comes from a message.
State to BlockActionRequest for when request comes from a message.ChannelIdChanged event.FocusOnLoad properties to blocks that support it.AccessibilityLabel to Button block.Thanks to @makeitokay for their help with this release 💪
Added calls API and call block.
AppUninstalled.Initial* properties in multi-select menus are not sent to Slack if they're empty. Fixes #114.Updating Newtonsoft.Json dependency to 13.0.1
IUsersApi.SetPresence takes in a RequestPresence enum instead of Presence, which has an Auto property instead of an Active property, as per the Slack API. The old method is still available, but marked as Obsolete.CoreSocketModeClient logs and ignores any messages that can't be deserialized
CoreSocketModeClient logs and ignores any messages that can't be deserializedFullMessageTemplateAdded optional teamId parameter to IConversationsApi.List
teamId parameter to IConversationsApi.ListThankyou to @jtsai-osa for this release 👍
Added Subtype property back to MessageEvent, which was accidentally removed in the previous release.
Subtype property back to MessageEvent, which was accidentally removed in the previous release.PlainText.Emoji is true by default to match Slack's default behaviour when the property isn't specified in the JSON.
PlainText.Emoji is true by default to match Slack's default behaviour when the property isn't specified in the JSON.MessageEventBase base class for AppMention & MessageEvent with common properties.ExtraProperties property to Event to catch any information that Slack sends that doesn't have an existing property.ClientMsgId and Team properties to MessageEventBase.ChannelType property to MessageEvent. The format doesn't match other ChannelType properties, so I've left it as a string for now, rather than using the existing ChannelType enum.EventTs property found on many event types up to the Event base class.Added missing properties to OauthV2AccessResponse.
OauthV2AccessResponse.OAuthV2Api.Access doesn't include authorization header in request.One column per quarter.