Repository navigation
This release adds all the remaining Slack Web API methods, including the admin APIs for Enterprise organizations. It also starts reducing how much of SlackNet's public API depends on Newtonsoft.Json, and adds nullable annotations to Web API responses.
Added
AdminAnalyticsApi, which reads an Enterprise organization's member analytics, public channel analytics and public channel metadata asMemberAnalytics,PublicChannelAnalyticsandPublicChannelMetadatarecords, streamed from Slack's compressed analytics files as you enumerate them.AdminAnalyticsMessagesApi, which gets activity metrics and metadata for a channel's messages, withMessageActivityandAnalyticsMessage.FilehasSubtypeandDurationMs.AdminAnalyticsSlackbotApi, which gets per-user Slackbot skill and tool usage, withSlackbotSkillUsageandSlackbotToolUsage.AdminAppsApi, which approves, restricts, clears the resolution of, and uninstalls apps in an Enterprise organization.AdminAppsActivitiesApi, which lists workflow app logs across an Enterprise organization, withAppActivity.AdminAppsApprovedApiandAdminAppsRestrictedApi, which list approved and restricted apps, withAppResolution.AdminAppsConfigApi, which looks up and sets connector configs, withAppConfig,AppDomainRestrictions,WorkflowAuthStrategyandRichLinkPreviewType.AdminAppsMcpServersApi, which lists the third-party app MCP servers approved for an Enterprise organization, withAppMcpServer, andAdminAppsMcpServersPermissionsApi, which lists and sets who can use an app's MCP servers, withMcpServerPermissions.AdminAppsPermissionsApi, which sets, lists, adds and removes who can access an app and where it can be used, withAppPermissionTypeandAppPermissions.AdminAppsRequestsApi, which lists and cancels app install requests, withAppRequest.AdminAuditAnomalyAllowApi, which reads and overwrites an Enterprise organization's allow list of IP blocks and ASNs, withAnomalyAllowList.AdminAuthPolicyApi, which assigns, lists and removes the users assigned to an authentication policy, withAuthPolicyEntityandAuthPolicyEntityType.AdminBarriersApi, which creates, lists, updates and deletes information barriers, withInformationBarrierandRestrictedSubject.AdminConversationsApi, which creates, archives, unarchives, renames, deletes, converts, searches and looks up channels across an Enterprise organization, invites and removes their members, and sets or disconnects the workspaces they're connected to, withAdminConversation,ConversationSearchTypeandConversationSearchSort. Its bulk methods return the channels Slack couldn't act on asConversationBulkActionFailures, andKickreturns the users it couldn't remove asConversationKickFailures. It also creates Salesforce channels and links and unlinks Salesforce records, gets and sets channels' posting, threading, huddle and mention preferences, withConversationPrefs,ConversationPermissionandConversationPermissionType, and gets, sets and removes conversations' custom retention policies, withConversationRetention.AdminConversationsEkmApi, which lists disconnected channels and their original channel IDs for Enterprise Key Management, withOriginalConnectedChannelInfo.AdminConversationsRestrictAccessApi, which adds, lists and removes the IDP groups allowed to access a private channel.AdminEmojiApi, which adds, aliases, lists, renames and removes custom emoji across an Enterprise organization, withCustomEmoji.AdminFunctionsApi, which lists apps' functions asFunctions, andAdminFunctionsPermissionsApi, which looks up and sets who can use functions, withFunctionPermissions,FunctionAccess,FunctionMetadata,FunctionPermissionSetting,EntityPermissionandPermissionVisibility.FunctionPermissionTypehasNoOne.AdminInviteRequestsApi, which approves, denies and lists pending requests to invite people to workspaces, asInviteRequests, andAdminInviteRequestsApprovedApiandAdminInviteRequestsDeniedApi, which list approved and denied requests, withApprovedInviteRequest,DeniedInviteRequest,WorkspaceInviteandActor.AdminRolesApi, which adds, lists and removes users' admin role assignments, withRoleAssignment. Users and entities that couldn't be added or removed can be read from theSlackExceptionasRoleAssignmentRejections.AdminSlackbotSkillsApi, which lists, publishes, unpublishes and auto-enables an organization's Slackbot skills, withSkillSort,SkillAutoEnabledStatusandSkillAutoEnabled. Skills that couldn't be published or unpublished can be read from theSlackExceptionasSkillFailures.AdminTeamsApi, which creates and lists workspaces in an Enterprise organization, withEnterpriseTeamandTeamDiscoverability,AdminTeamsAdminsApiandAdminTeamsOwnersApi, which list a workspace's admins and owners, andAdminTeamsSettingsApi, which gets a workspace's settings and sets its default channels, description, discoverability, icon and name.TeamhasDefaultChannels.AdminUserGroupsApi, which creates, fetches and updates organization-wide user groups, adds, removes and uploads their members, and adds, lists and removes the default channels and workspaces of IDP groups. Users that couldn't be added are returned asUserFailures.UserGrouphasEnterpriseId,EnterpriseSubteamId,IsSubteam,AutoProvision,IsSection,IsEditingRestricted,IsMembershipLocked,IsIdpGroup,IsVisible,IsOrgLevel,TeamsandChannelCount, andConversationhasTeamIdandIsRedacted.AdminUsersApi, which assigns, invites, lists, removes and deactivates users in an Enterprise organization, sets them as admins, owners or regular users, and gets and sets guests' expirations, withAdminUser,AdminUsersAccessApi, which pauses and resumes frontline members' access,AdminUsersSessionApi, which lists, invalidates and resets users' sessions and gets, sets and clears their session settings, withActiveSession,SessionDetailsandUserSessionSettings, andAdminUsersUnsupportedVersionsApi, which exports the members using unsupported software. Users whose access couldn't be paused or resumed can be read from theSlackExceptionasUserFailures.AdminWorkflowsApi, which searches and unpublishes workflows, withWorkflow,WorkflowSource,WorkflowSearchSortandPublishStatus,AdminWorkflowsCollaboratorsApi, which adds and removes workflow collaborators,AdminWorkflowsPermissionsApi, which looks up who can run workflows, withWorkflowPermissions, andAdminWorkflowsTriggersTypesPermissionsApi, which looks up and sets who can use trigger types, withTriggerTypePermissions,TriggerTypeMetadataandTriggerTypePermissionSetting.AgentsConversationsApi, which creates, archives and sets properties and slash commands on code channels, and manages their views and canvases, withCodeChannelProperties,ContextBarItem,AgentResource,AgentCommand,AgentViewandCanvasComment.AccessLevelhasCommentfor comment-only canvas views.AgentsSessionsApi.Rename, which renames an agent session.AppDeleted,AppInstalled,AppRequestedandAppUninstalledTeamevents, withAppRequest,AppandAppScope.AppRateLimitedevent, which Slack sends when your app's event subscriptions are rate limited. Event handlers receive it in anEventCallback, over HTTP or Socket Mode, even though Slack doesn't send it in one.AppsApi.Uninstall, which uninstalls your app from a workspace, revoking all of the installation's tokens.AppsIconApi, which sets an app's icon from an uploaded image or a URL.AppsManagedPermissionsApi, which sets who can interact with a managed app, withManagedAppPermissionType, and returns itsAppPermissions.AppsManifestApi, which creates, updates, exports, validates and deletes apps from app manifests, withAppCreationResponse,AppCredentials, andAppManifestand its parts in theSlackNet.AppManifestsnamespace.AppsUserConnectionApi, which updates the connection status between a user and your app, in response to aUserConnectionevent.BlocksApi.Validate, which validates blocks, a message or a view against the Block Kit schema.CallRejectedevent, which Slack sends when a user rejects a call shared with them in a DM.CanvasesApi.GetContent, which gets the content of a canvas as markdown or HTML.ChannelPostingPermissionsmessage event, which Slack sends when a user changes a channel's posting permissions.ContentType.ChannelsandContentType.Users, for searching channels and users withAssistantSearchApi.Context.DateTimeproperties alongside Unix timestamp properties:CreatedChannel.CreatedDate,RenamedChannel.CreatedDate,PinnedInfo.PinnedTimestamp,SubteamMembersChanged.PreviousUpdateandUpdated,Bookmark.CreatedandUpdated,Call.Started,ConnectedTeam.Created,Conversation.UpdatedDate,ExternalTeam.LastActive,File.CreatedDate,FileComment.CreatedDate,Function.Created,UpdatedandDeleted,Invite.CreatedandExpires,InviteChannel.Created,ListView.Created,OwnDndStatus.SnoozeEnd,Topic.LastSetDate,Purpose.LastSetDate,UserProfile.StatusExpirationDateandHuddleStateExpiration,Login.FirstandLast,ScheduledMessage.PostAtDateandCreated,PendingInvite.LastUpdated,InviteAcceptance.Accepted,ExpiresandLastUpdated,InviteReview.Reviewed, andTokenRotationResponse.ExpiresandIssuedAt.EntityApi.PresentCommentsandEntityApi.AcknowledgeCommentAction, withEntityComment, theEntityCommentsRequestedevent, andWorkObjectEntity.EntityCommentsto enable the comments tab, for Work Object comments.EntityCommentViewInfoandViewSubmission.TriggerId, so view submissions for Work Object comment posts and edits can be handled and acknowledged withEntityApi.AcknowledgeCommentAction.ErrorResponse.ErrorsandSlackException.ErrorDetails, with the issues Slack found in a request, such as invalid elements reported byBlocksApi.Validate.SlackExceptionmessages include them too.ErrorResponse.Field<T>andSlackException.ErrorField<T>, which read the fields specific to an error, such as theinvalid_mcp_serversreturned bySlackbotSkillsApi.Create.ExternalOrgMigrationStartedandExternalOrgMigrationFinishedevents, which Slack sends when an external workspace starts and finishes migrating to an Enterprise organization, withTeam.IsMigrating.ExtraProperty<T>andSetExtraPropertyonEventandMessageSearchResult, for properties SlackNet doesn't model. They use the JSON settings the event or search result was read with.InviteRequestedevent, withInviteRequestandInviteRequestType, which Slack sends when a user requests an invite.ISlackApiClient.GetStream, which calls a Slack API method that responds with a file, and returns its content as it arrives.JsonData, for JSON whose shape SlackNet doesn't define, which converts to and from your own types withToObject<T>andFromObject, using SlackNet's JSON conventions, and to and fromJTokenwithToJsonDataandToJToken.MessageMetadata.Payload,FunctionData.InputValuesandAppContextEntity.Datahold it, andFunctionsApi.CompleteSuccesshas a generic overload that takes outputs of any type, includingJsonData.OAuthV2Api.BeginShortTokenRotationandOAuthV2Api.CompleteShortTokenRotation, which rotate an old user token with a short secret to one with a longer secret.OAuthV2Api.UserAccess, which exchanges an OAuth code for a user access token, for OAuth flows with only user scopes.OauthV2AccessResponse.UserId, with the ID of the user the token belongs to.SharedChannelInviteRequestedevent, withInviteTargetUser, which Slack sends when a shared channel invite needs approval.ConnectedTeamhasAvatarBaseUrlandRequiresSponsorship, andInviteChannelhasDateCreatedandMessageLatestCountedTimestamp.SlackbotSkillsApiandSlackbotSkillsLibraryApi, which create, update, delete, list and get Slackbot skills, and turn them on or off for the caller.UseHttpClient, which configures theHttpClientthat sends each request to Slack, such as one with a proxy, andSlackApiClientandFilesApiconstructors that take aFunc<HttpClient>. The client is requested for each request and isn't disposed by SlackNet.UserChange.CacheTsandUserChange.CacheTime, also onUserProfileChangedandUserStatusChanged.UserConnectionevent, with itsUserConnectandUserDisconnectsubtypes, which Slack sends when a user requests to connect with or disconnect from your app.UserGuestStatusChangedevent, which Slack sends when a user's guest status changes.
Changed
SlackExceptionmessages include error fields that aren't strings, as JSON.- Web API response types, and the Slack objects they contain, such as
User,ConversationandFile, have nullable annotations. Properties Slack doesn't always return are nullable, so projects with nullable reference types enabled may see new warnings.ViewState.GetValuereturns a nullable value, andIReadOnlyAttachment's strings are nullable. Events, blocks, interaction payloads and API arguments will be annotated in later releases.
Deprecated
MessageMetadata.EventPayload,FunctionData.InputsandAppContextEntity.Value, which expose Newtonsoft.Json types. UsePayload,InputValuesandDatainstead.- The
JObjectoverload ofFunctionsApi.CompleteSuccess, which exposes a Newtonsoft.Json type. Use the generic overload instead. Event.ExtraPropertiesandMessageSearchResult.ExtraProperties, which expose Newtonsoft.Json types. UseExtraProperty<T>andSetExtraPropertyinstead.CoreSocketModeClient,ICoreSocketModeClient, theSlackSocketModeClientconstructor and the socket mode messages inSlackNet.SocketMode, such asSocketEnvelopeandAcknowledgement, which will become internal. Use the socket mode client fromSlackServiceBuilderorAddSlackNetinstead.IHttp,UseHttp,ISlackServiceProvider.GetHttp,Default.Http, and theSlackApiClientandFilesApiconstructors that take anIHttp. Configure theHttpClientSlackNet uses instead, withUseHttpClient, or theSlackApiClientandFilesApiconstructors that take aFunc<HttpClient>.
Fixed
- Socket Mode acknowledges Events API payloads without an event, instead of logging a
NullReferenceException. ExternalTeamsApi.Disconnectsends the team astarget_team, which Slack requires, instead oftarget_team_id.FilesApi.GetUploadUrlExternalsends alt text asalt_txt, which Slack reads, instead ofalt_text.File's thumbnail properties, such asThumb64andThumb360W, andUserIdentity's image properties are deserialized.ListDownloadResponse.Urlis read from Slack'sdownload_url.TeamPreferences.MsgEditWindowMinis read from Slack'smsg_edit_window_mins.ConversationsApi.SetPurposeandSetTopicreturn the new purpose and topic, from the channel Slack now responds with, instead of null.AssistantSearchApi.Contextresults are deserialized.AssistantSearchContextResponse.ResultsreplacesResult, and itsMessagesareAssistantSearchMessages rather thanMessageEvents. Results now also includeFiles,ChannelsandUsers, and the response hasFailedContentTypes.