Skip to main content

SlackClient

Struct SlackClient 

Source
pub struct SlackClient { /* private fields */ }
Expand description

Slack Web API client.

Clones share the underlying HTTP client and its connection pool, so cloning is cheap. Create one per application. To call with another token, use SlackClient::with_token.

Every Web API method has a function here named after it (chat.postMessage is SlackClient::chat_post_message); see crate::api for the full list.

use slack_web_api::api::UsersInfoRequest;
use slack_web_api::SlackClient;

let client = SlackClient::new(std::env::var("SLACK_BOT_TOKEN").unwrap());
let user = client.users_info(&UsersInfoRequest::new().user("U0123456789")).await?;
println!("{:?}", user.user.and_then(|u| u.real_name));

Implementations§

Source§

impl SlackClient

Source

pub async fn admin_analytics_get_file( &self, request: &AdminAnalyticsGetFileRequest, ) -> Result<Bytes, SlackError>

Calls the Slack Web API method admin.analytics.getFile: Retrieve analytics data for a given date, presented as a compressed JSON file

Required scopes:

  • user token: admin.analytics:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

Returns the raw file body (a gzip-compressed JSON Lines file), not JSON.

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_analytics_messages_activity( &self, request: &AdminAnalyticsMessagesActivityRequest, ) -> Result<AdminAnalyticsMessagesActivityResponse, SlackError>

Calls the Slack Web API method admin.analytics.messages.activity: Retrieves activity metrics for messages from a given channel.

Required scopes:

  • user token: admin.analytics:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_analytics_messages_metadata( &self, request: &AdminAnalyticsMessagesMetadataRequest, ) -> Result<AdminAnalyticsMessagesMetadataResponse, SlackError>

Calls the Slack Web API method admin.analytics.messages.metadata: Retrieves metadata for a list of messages from a given channel.

Required scopes:

  • user token: admin.analytics:read

Rate limit: 1200 requests per minute with a burst allowance of 2000.

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_apps_activities_list( &self, request: &AdminAppsActivitiesListRequest, ) -> Result<AdminAppsActivitiesListResponse, SlackError>

Calls the Slack Web API method admin.apps.activities.list: Get logs for a specified team/org

Required scopes:

  • user token: admin.app_activities:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_approve( &self, request: &AdminAppsApproveRequest, ) -> Result<AdminAppsApproveResponse, SlackError>

Calls the Slack Web API method admin.apps.approve: Approve an app for installation on a workspace.

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_approved_list( &self, request: &AdminAppsApprovedListRequest, ) -> Result<AdminAppsApprovedListResponse, SlackError>

Calls the Slack Web API method admin.apps.approved.list: List approved apps for an org or workspace.

Required scopes:

  • user token: admin.apps:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_clear_resolution( &self, request: &AdminAppsClearResolutionRequest, ) -> Result<AdminAppsClearResolutionResponse, SlackError>

Calls the Slack Web API method admin.apps.clearResolution: Clear an app resolution

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_config_lookup( &self, request: &AdminAppsConfigLookupRequest, ) -> Result<AdminAppsConfigLookupResponse, SlackError>

Calls the Slack Web API method admin.apps.config.lookup: Look up the app config for connectors by their IDs

Required scopes:

  • user token: admin.apps:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_config_set( &self, request: &AdminAppsConfigSetRequest, ) -> Result<AdminAppsConfigSetResponse, SlackError>

Calls the Slack Web API method admin.apps.config.set: Set the app config for a connector

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_mcp_servers_list( &self, request: &AdminAppsMcpServersListRequest, ) -> Result<AdminAppsMcpServersListResponse, SlackError>

Calls the Slack Web API method admin.apps.mcp.servers.list: List third-party app MCP servers approved for an organization.

Required scopes:

  • user token: admin.apps:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_mcp_servers_permissions_list( &self, request: &AdminAppsMcpServersPermissionsListRequest, ) -> Result<AdminAppsMcpServersPermissionsListResponse, SlackError>

Calls the Slack Web API method admin.apps.mcp.servers.permissions.list: List MCP servers for an app with their access control permissions.

Required scopes:

  • user token: admin.apps:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_mcp_servers_permissions_set( &self, request: &AdminAppsMcpServersPermissionsSetRequest, ) -> Result<AdminAppsMcpServersPermissionsSetResponse, SlackError>

Calls the Slack Web API method admin.apps.mcp.servers.permissions.set: Set the access control permission for who can use an MCP server.

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_permissions_add( &self, request: &AdminAppsPermissionsAddRequest, ) -> Result<AdminAppsPermissionsAddResponse, SlackError>

Calls the Slack Web API method admin.apps.permissions.add: Grant permission for entities to access an app that has its permission type set to named_entities.

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_permissions_list( &self, request: &AdminAppsPermissionsListRequest, ) -> Result<AdminAppsPermissionsListResponse, SlackError>

Calls the Slack Web API method admin.apps.permissions.list: Returns the permission type of an app and the entities that have been granted access.

Required scopes:

  • user token: admin.apps:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_permissions_remove( &self, request: &AdminAppsPermissionsRemoveRequest, ) -> Result<AdminAppsPermissionsRemoveResponse, SlackError>

Calls the Slack Web API method admin.apps.permissions.remove: Revoke an entity’s access to an app that has its permission type set to named_entities.

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_permissions_set( &self, request: &AdminAppsPermissionsSetRequest, ) -> Result<AdminAppsPermissionsSetResponse, SlackError>

Calls the Slack Web API method admin.apps.permissions.set: Set the permission type for who can access an app.

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_requests_cancel( &self, request: &AdminAppsRequestsCancelRequest, ) -> Result<AdminAppsRequestsCancelResponse, SlackError>

Calls the Slack Web API method admin.apps.requests.cancel: Cancel app request for team

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_requests_list( &self, request: &AdminAppsRequestsListRequest, ) -> Result<AdminAppsRequestsListResponse, SlackError>

Calls the Slack Web API method admin.apps.requests.list: List app requests for a team/workspace.

Required scopes:

  • user token: admin.apps:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_restrict( &self, request: &AdminAppsRestrictRequest, ) -> Result<AdminAppsRestrictResponse, SlackError>

Calls the Slack Web API method admin.apps.restrict: Restrict an app for installation on a workspace.

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_restricted_list( &self, request: &AdminAppsRestrictedListRequest, ) -> Result<AdminAppsRestrictedListResponse, SlackError>

Calls the Slack Web API method admin.apps.restricted.list: List restricted apps for an org or workspace.

Required scopes:

  • user token: admin.apps:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_apps_uninstall( &self, request: &AdminAppsUninstallRequest, ) -> Result<AdminAppsUninstallResponse, SlackError>

Calls the Slack Web API method admin.apps.uninstall: Uninstall an app from one or many workspaces, or an entire enterprise organization.

Required scopes:

  • user token: admin.apps:write

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_audit_anomaly_allow_get_item( &self, request: &AdminAuditAnomalyAllowGetItemRequest, ) -> Result<AdminAuditAnomalyAllowGetItemResponse, SlackError>

Calls the Slack Web API method admin.audit.anomaly.allow.getItem: API to allow Enterprise org admins to read the allow list of IP blocks and ASNs from the enterprise configuration.

Required scopes:

  • user token: admin

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_audit_anomaly_allow_update_item( &self, request: &AdminAuditAnomalyAllowUpdateItemRequest, ) -> Result<AdminAuditAnomalyAllowUpdateItemResponse, SlackError>

Calls the Slack Web API method admin.audit.anomaly.allow.updateItem: API to allow Enterprise org admins to write/overwrite the allow list of IP blocks and ASNs from the enterprise configuration.

Required scopes:

  • user token: admin

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_auth_policy_assign_entities( &self, request: &AdminAuthPolicyAssignEntitiesRequest, ) -> Result<AdminAuthPolicyAssignEntitiesResponse, SlackError>

Calls the Slack Web API method admin.auth.policy.assignEntities: Assign entities to a particular authentication policy.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_auth_policy_get_entities( &self, request: &AdminAuthPolicyGetEntitiesRequest, ) -> Result<AdminAuthPolicyGetEntitiesResponse, SlackError>

Calls the Slack Web API method admin.auth.policy.getEntities: Fetch all the entities assigned to a particular authentication policy by name.

Required scopes:

  • user token: admin.users:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_auth_policy_remove_entities( &self, request: &AdminAuthPolicyRemoveEntitiesRequest, ) -> Result<AdminAuthPolicyRemoveEntitiesResponse, SlackError>

Calls the Slack Web API method admin.auth.policy.removeEntities: Remove specified entities from a specified authentication policy.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_barriers_create( &self, request: &AdminBarriersCreateRequest, ) -> Result<AdminBarriersCreateResponse, SlackError>

Calls the Slack Web API method admin.barriers.create: Create an Information Barrier

Required scopes:

  • user token: admin.barriers:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_barriers_delete( &self, request: &AdminBarriersDeleteRequest, ) -> Result<AdminBarriersDeleteResponse, SlackError>

Calls the Slack Web API method admin.barriers.delete: Delete an existing Information Barrier

Required scopes:

  • user token: admin.barriers:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_barriers_list( &self, request: &AdminBarriersListRequest, ) -> Result<AdminBarriersListResponse, SlackError>

Calls the Slack Web API method admin.barriers.list: Get all Information Barriers for your organization

Required scopes:

  • user token: admin.barriers:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_barriers_update( &self, request: &AdminBarriersUpdateRequest, ) -> Result<AdminBarriersUpdateResponse, SlackError>

Calls the Slack Web API method admin.barriers.update: Update an existing Information Barrier

Required scopes:

  • user token: admin.barriers:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_conversations_archive( &self, request: &AdminConversationsArchiveRequest, ) -> Result<AdminConversationsArchiveResponse, SlackError>

Calls the Slack Web API method admin.conversations.archive: Archive a public or private channel.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_bulk_archive( &self, request: &AdminConversationsBulkArchiveRequest, ) -> Result<AdminConversationsBulkArchiveResponse, SlackError>

Calls the Slack Web API method admin.conversations.bulkArchive: Archive public or private channels in bulk.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_bulk_delete( &self, request: &AdminConversationsBulkDeleteRequest, ) -> Result<AdminConversationsBulkDeleteResponse, SlackError>

Calls the Slack Web API method admin.conversations.bulkDelete: Delete public or private channels in bulk

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_bulk_move( &self, request: &AdminConversationsBulkMoveRequest, ) -> Result<AdminConversationsBulkMoveResponse, SlackError>

Calls the Slack Web API method admin.conversations.bulkMove: Move public or private channels in bulk.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_bulk_set_exclude_from_slack_ai( &self, request: &AdminConversationsBulkSetExcludeFromSlackAiRequest, ) -> Result<AdminConversationsBulkSetExcludeFromSlackAiResponse, SlackError>

Calls the Slack Web API method admin.conversations.bulkSetExcludeFromSlackAi: Exclude channels from Slack AI in bulk

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_bulk_set_properties( &self, request: &AdminConversationsBulkSetPropertiesRequest, ) -> Result<AdminConversationsBulkSetPropertiesResponse, SlackError>

Calls the Slack Web API method admin.conversations.bulkSetProperties: Set properties on channels in bulk

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_convert_to_private( &self, request: &AdminConversationsConvertToPrivateRequest, ) -> Result<AdminConversationsConvertToPrivateResponse, SlackError>

Calls the Slack Web API method admin.conversations.convertToPrivate: Convert a public channel to a private channel.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_convert_to_public( &self, request: &AdminConversationsConvertToPublicRequest, ) -> Result<AdminConversationsConvertToPublicResponse, SlackError>

Calls the Slack Web API method admin.conversations.convertToPublic: Convert a private channel to a public channel.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_create( &self, request: &AdminConversationsCreateRequest, ) -> Result<AdminConversationsCreateResponse, SlackError>

Calls the Slack Web API method admin.conversations.create: Create a public or private channel-based conversation.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_create_for_objects( &self, request: &AdminConversationsCreateForObjectsRequest, ) -> Result<AdminConversationsCreateForObjectsResponse, SlackError>

Calls the Slack Web API method admin.conversations.createForObjects: Create a Salesforce channel for the corresponding object provided.

Required scopes:

  • user token: admin.conversations:manage_objects

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_delete( &self, request: &AdminConversationsDeleteRequest, ) -> Result<AdminConversationsDeleteResponse, SlackError>

Calls the Slack Web API method admin.conversations.delete: Delete a public or private channel.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_disconnect_shared( &self, request: &AdminConversationsDisconnectSharedRequest, ) -> Result<AdminConversationsDisconnectSharedResponse, SlackError>

Calls the Slack Web API method admin.conversations.disconnectShared: Disconnect a connected channel from one or more workspaces.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_ekm_list_original_connected_channel_info( &self, request: &AdminConversationsEkmListOriginalConnectedChannelInfoRequest, ) -> Result<AdminConversationsEkmListOriginalConnectedChannelInfoResponse, SlackError>

Calls the Slack Web API method admin.conversations.ekm.listOriginalConnectedChannelInfo: List all disconnected channels—i.e., channels that were once connected to other workspaces and then disconnected—and the corresponding original channel IDs for key revocation with EKM.

Required scopes:

  • user token: admin.conversations:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_get_conversation_prefs( &self, request: &AdminConversationsGetConversationPrefsRequest, ) -> Result<AdminConversationsGetConversationPrefsResponse, SlackError>

Calls the Slack Web API method admin.conversations.getConversationPrefs: Get conversation preferences for a public or private channel.

Required scopes:

  • user token: admin.conversations:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_get_custom_retention( &self, request: &AdminConversationsGetCustomRetentionRequest, ) -> Result<AdminConversationsGetCustomRetentionResponse, SlackError>

Calls the Slack Web API method admin.conversations.getCustomRetention: This API endpoint can be used by any admin to get a conversation’s retention policy.

Required scopes:

  • user token: admin.conversations:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_get_teams( &self, request: &AdminConversationsGetTeamsRequest, ) -> Result<AdminConversationsGetTeamsResponse, SlackError>

Calls the Slack Web API method admin.conversations.getTeams: Get all the workspaces a given public or private channel is connected to within this Enterprise org.

Required scopes:

  • user token: admin.conversations:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_invite( &self, request: &AdminConversationsInviteRequest, ) -> Result<AdminConversationsInviteResponse, SlackError>

Calls the Slack Web API method admin.conversations.invite: Invite a user to a public or private channel.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Calls the Slack Web API method admin.conversations.linkObjects: Link a Salesforce record to a channel

Required scopes:

  • user token: admin.conversations:manage_objects

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_lookup( &self, request: &AdminConversationsLookupRequest, ) -> Result<AdminConversationsLookupResponse, SlackError>

Calls the Slack Web API method admin.conversations.lookup: Returns channels on the given team using the filters.

Required scopes:

  • user token: admin.conversations:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_remove_custom_retention( &self, request: &AdminConversationsRemoveCustomRetentionRequest, ) -> Result<AdminConversationsRemoveCustomRetentionResponse, SlackError>

Calls the Slack Web API method admin.conversations.removeCustomRetention: This API endpoint can be used by any admin to remove a conversation’s retention policy.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_rename( &self, request: &AdminConversationsRenameRequest, ) -> Result<AdminConversationsRenameResponse, SlackError>

Calls the Slack Web API method admin.conversations.rename: Rename a public or private channel.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_restrict_access_add_group( &self, request: &AdminConversationsRestrictAccessAddGroupRequest, ) -> Result<AdminConversationsRestrictAccessAddGroupResponse, SlackError>

Calls the Slack Web API method admin.conversations.restrictAccess.addGroup: Add an allowlist of IDP groups for accessing a channel

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_restrict_access_list_groups( &self, request: &AdminConversationsRestrictAccessListGroupsRequest, ) -> Result<AdminConversationsRestrictAccessListGroupsResponse, SlackError>

Calls the Slack Web API method admin.conversations.restrictAccess.listGroups: List all IDP Groups linked to a channel

Required scopes:

  • user token: admin.conversations:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_restrict_access_remove_group( &self, request: &AdminConversationsRestrictAccessRemoveGroupRequest, ) -> Result<AdminConversationsRestrictAccessRemoveGroupResponse, SlackError>

Calls the Slack Web API method admin.conversations.restrictAccess.removeGroup: Remove a linked IDP group linked from a private channel

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Calls the Slack Web API method admin.conversations.search: Search for public or private channels in an Enterprise organization.

Required scopes:

  • user token: admin.conversations:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_set_conversation_prefs( &self, request: &AdminConversationsSetConversationPrefsRequest, ) -> Result<AdminConversationsSetConversationPrefsResponse, SlackError>

Calls the Slack Web API method admin.conversations.setConversationPrefs: Set the posting permissions for a public or private channel.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_set_custom_retention( &self, request: &AdminConversationsSetCustomRetentionRequest, ) -> Result<AdminConversationsSetCustomRetentionResponse, SlackError>

Calls the Slack Web API method admin.conversations.setCustomRetention: This API endpoint can be used by any admin to set a conversation’s retention policy.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_set_teams( &self, request: &AdminConversationsSetTeamsRequest, ) -> Result<AdminConversationsSetTeamsResponse, SlackError>

Calls the Slack Web API method admin.conversations.setTeams: Set the workspaces in an Enterprise org that connect to a public or private channel.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_conversations_unarchive( &self, request: &AdminConversationsUnarchiveRequest, ) -> Result<AdminConversationsUnarchiveResponse, SlackError>

Calls the Slack Web API method admin.conversations.unarchive: Unarchive a public or private channel.

Required scopes:

  • user token: admin.conversations:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Calls the Slack Web API method admin.conversations.unlinkObjects: Unlink a Salesforce record from a channel

Required scopes:

  • user token: admin.conversations:manage_objects

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_emoji_add( &self, request: &AdminEmojiAddRequest, ) -> Result<AdminEmojiAddResponse, SlackError>

Calls the Slack Web API method admin.emoji.add: Add an emoji.

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_emoji_add_alias( &self, request: &AdminEmojiAddAliasRequest, ) -> Result<AdminEmojiAddAliasResponse, SlackError>

Calls the Slack Web API method admin.emoji.addAlias: Add an emoji alias.

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_emoji_list( &self, request: &AdminEmojiListRequest, ) -> Result<AdminEmojiListResponse, SlackError>

Calls the Slack Web API method admin.emoji.list: List emoji for an Enterprise organization.

Required scopes:

  • user token: admin.teams:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_emoji_remove( &self, request: &AdminEmojiRemoveRequest, ) -> Result<AdminEmojiRemoveResponse, SlackError>

Calls the Slack Web API method admin.emoji.remove: Remove an emoji across an Enterprise organization

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_emoji_rename( &self, request: &AdminEmojiRenameRequest, ) -> Result<AdminEmojiRenameResponse, SlackError>

Calls the Slack Web API method admin.emoji.rename: Rename an emoji.

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_functions_list( &self, request: &AdminFunctionsListRequest, ) -> Result<AdminFunctionsListResponse, SlackError>

Calls the Slack Web API method admin.functions.list: Look up functions by a set of apps.

Required scopes:

  • user token: admin.workflows:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_functions_permissions_lookup( &self, request: &AdminFunctionsPermissionsLookupRequest, ) -> Result<AdminFunctionsPermissionsLookupResponse, SlackError>

Calls the Slack Web API method admin.functions.permissions.lookup: Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities.

Required scopes:

  • user token: admin.workflows:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_functions_permissions_set( &self, request: &AdminFunctionsPermissionsSetRequest, ) -> Result<AdminFunctionsPermissionsSetResponse, SlackError>

Calls the Slack Web API method admin.functions.permissions.set: Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities.

Required scopes:

  • user token: admin.workflows:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_invite_requests_approve( &self, request: &AdminInviteRequestsApproveRequest, ) -> Result<AdminInviteRequestsApproveResponse, SlackError>

Calls the Slack Web API method admin.inviteRequests.approve: Approve a workspace invite request.

Required scopes:

  • user token: admin.invites:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_invite_requests_approved_list( &self, request: &AdminInviteRequestsApprovedListRequest, ) -> Result<AdminInviteRequestsApprovedListResponse, SlackError>

Calls the Slack Web API method admin.inviteRequests.approved.list: List all approved workspace invite requests.

Required scopes:

  • user token: admin.invites:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_invite_requests_denied_list( &self, request: &AdminInviteRequestsDeniedListRequest, ) -> Result<AdminInviteRequestsDeniedListResponse, SlackError>

Calls the Slack Web API method admin.inviteRequests.denied.list: List all denied workspace invite requests.

Required scopes:

  • user token: admin.invites:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_invite_requests_deny( &self, request: &AdminInviteRequestsDenyRequest, ) -> Result<AdminInviteRequestsDenyResponse, SlackError>

Calls the Slack Web API method admin.inviteRequests.deny: Deny a workspace invite request.

Required scopes:

  • user token: admin.invites:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_invite_requests_list( &self, request: &AdminInviteRequestsListRequest, ) -> Result<AdminInviteRequestsListResponse, SlackError>

Calls the Slack Web API method admin.inviteRequests.list: List all pending workspace invite requests.

Required scopes:

  • user token: admin.invites:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_roles_add_assignments( &self, request: &AdminRolesAddAssignmentsRequest, ) -> Result<AdminRolesAddAssignmentsResponse, SlackError>

Calls the Slack Web API method admin.roles.addAssignments: Adds members to the specified role with the specified scopes

Required scopes:

  • user token: admin.roles:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_roles_list_assignments( &self, request: &AdminRolesListAssignmentsRequest, ) -> Result<AdminRolesListAssignmentsResponse, SlackError>

Calls the Slack Web API method admin.roles.listAssignments: Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities

Required scopes:

  • user token: admin.roles:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_roles_remove_assignments( &self, request: &AdminRolesRemoveAssignmentsRequest, ) -> Result<AdminRolesRemoveAssignmentsResponse, SlackError>

Calls the Slack Web API method admin.roles.removeAssignments: Removes a set of users from a role for the given scopes and entities

Required scopes:

  • user token: admin.roles:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_teams_admins_list( &self, request: &AdminTeamsAdminsListRequest, ) -> Result<AdminTeamsAdminsListResponse, SlackError>

Calls the Slack Web API method admin.teams.admins.list: List all of the admins on a given workspace.

Required scopes:

  • user token: admin.teams:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_teams_create( &self, request: &AdminTeamsCreateRequest, ) -> Result<AdminTeamsCreateResponse, SlackError>

Calls the Slack Web API method admin.teams.create: Create an Enterprise team.

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_teams_list( &self, request: &AdminTeamsListRequest, ) -> Result<AdminTeamsListResponse, SlackError>

Calls the Slack Web API method admin.teams.list: List all teams in an Enterprise organization

Required scopes:

  • user token: admin.teams:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_teams_owners_list( &self, request: &AdminTeamsOwnersListRequest, ) -> Result<AdminTeamsOwnersListResponse, SlackError>

Calls the Slack Web API method admin.teams.owners.list: List all of the owners on a given workspace.

Required scopes:

  • user token: admin.teams:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_teams_settings_info( &self, request: &AdminTeamsSettingsInfoRequest, ) -> Result<AdminTeamsSettingsInfoResponse, SlackError>

Calls the Slack Web API method admin.teams.settings.info: Fetch information about settings in a workspace

Required scopes:

  • user token: admin.teams:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_teams_settings_set_default_channels( &self, request: &AdminTeamsSettingsSetDefaultChannelsRequest, ) -> Result<AdminTeamsSettingsSetDefaultChannelsResponse, SlackError>

Calls the Slack Web API method admin.teams.settings.setDefaultChannels: Set the default channels of a workspace.

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_teams_settings_set_description( &self, request: &AdminTeamsSettingsSetDescriptionRequest, ) -> Result<AdminTeamsSettingsSetDescriptionResponse, SlackError>

Calls the Slack Web API method admin.teams.settings.setDescription: Set the description of a given workspace.

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_teams_settings_set_discoverability( &self, request: &AdminTeamsSettingsSetDiscoverabilityRequest, ) -> Result<AdminTeamsSettingsSetDiscoverabilityResponse, SlackError>

Calls the Slack Web API method admin.teams.settings.setDiscoverability: An API method that allows admins to set the discoverability of a given workspace

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_teams_settings_set_icon( &self, request: &AdminTeamsSettingsSetIconRequest, ) -> Result<AdminTeamsSettingsSetIconResponse, SlackError>

Calls the Slack Web API method admin.teams.settings.setIcon: Sets the icon of a workspace.

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_teams_settings_set_name( &self, request: &AdminTeamsSettingsSetNameRequest, ) -> Result<AdminTeamsSettingsSetNameResponse, SlackError>

Calls the Slack Web API method admin.teams.settings.setName: Set the name of a given workspace.

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_usergroups_add_channels( &self, request: &AdminUsergroupsAddChannelsRequest, ) -> Result<AdminUsergroupsAddChannelsResponse, SlackError>

Calls the Slack Web API method admin.usergroups.addChannels: Add up to one hundred default channels to an IDP group.

Required scopes:

  • user token: admin.usergroups:write

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_add_teams( &self, request: &AdminUsergroupsAddTeamsRequest, ) -> Result<AdminUsergroupsAddTeamsResponse, SlackError>

Calls the Slack Web API method admin.usergroups.addTeams: Associate one or more default workspaces with an organization-wide IDP group.

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_add_users( &self, request: &AdminUsergroupsAddUsersRequest, ) -> Result<AdminUsergroupsAddUsersResponse, SlackError>

Calls the Slack Web API method admin.usergroups.addUsers: Add members to an existing organizational usergroup.

Required scopes:

  • user token: admin.usergroups:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_create( &self, request: &AdminUsergroupsCreateRequest, ) -> Result<AdminUsergroupsCreateResponse, SlackError>

Calls the Slack Web API method admin.usergroups.create: Create a new organizational usergroup.

Required scopes:

  • user token: admin.usergroups:write

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_fetch( &self, request: &AdminUsergroupsFetchRequest, ) -> Result<AdminUsergroupsFetchResponse, SlackError>

Calls the Slack Web API method admin.usergroups.fetch: Fetch an organizational usergroup.

Required scopes:

  • user token: admin.usergroups:read

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_list_channels( &self, request: &AdminUsergroupsListChannelsRequest, ) -> Result<AdminUsergroupsListChannelsResponse, SlackError>

Calls the Slack Web API method admin.usergroups.listChannels: List the channels linked to an org-level IDP group (user group).

Required scopes:

  • user token: admin.usergroups:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_remove_channels( &self, request: &AdminUsergroupsRemoveChannelsRequest, ) -> Result<AdminUsergroupsRemoveChannelsResponse, SlackError>

Calls the Slack Web API method admin.usergroups.removeChannels: Remove one or more default channels from an org-level IDP group (user group).

Required scopes:

  • user token: admin.usergroups:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_remove_teams( &self, request: &AdminUsergroupsRemoveTeamsRequest, ) -> Result<AdminUsergroupsRemoveTeamsResponse, SlackError>

Calls the Slack Web API method admin.usergroups.removeTeams: Remove one or more default workspaces from an organization-wide IDP Group or Admin Group

Required scopes:

  • user token: admin.teams:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_remove_users( &self, request: &AdminUsergroupsRemoveUsersRequest, ) -> Result<AdminUsergroupsRemoveUsersResponse, SlackError>

Calls the Slack Web API method admin.usergroups.removeUsers: Remove members from an existing organizational usergroup.

Required scopes:

  • user token: admin.usergroups:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_update( &self, request: &AdminUsergroupsUpdateRequest, ) -> Result<AdminUsergroupsUpdateResponse, SlackError>

Calls the Slack Web API method admin.usergroups.update: Update one or more properties of an existing organizational usergroup.

Required scopes:

  • user token: admin.usergroups:write

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_usergroups_upload_users( &self, request: &AdminUsergroupsUploadUsersRequest, ) -> Result<AdminUsergroupsUploadUsersResponse, SlackError>

Calls the Slack Web API method admin.usergroups.uploadUsers: Add members to an existing organizational usergroup in bulk via CSV upload.

Required scopes:

  • user token: admin.usergroups:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_users_assign( &self, request: &AdminUsersAssignRequest, ) -> Result<AdminUsersAssignResponse, SlackError>

Calls the Slack Web API method admin.users.assign: Add an Enterprise user to a workspace.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_get_expiration( &self, request: &AdminUsersGetExpirationRequest, ) -> Result<AdminUsersGetExpirationResponse, SlackError>

Calls the Slack Web API method admin.users.getExpiration: Fetches the expiration timestamp for a guest.

Required scopes:

  • user token: admin.users:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_invite( &self, request: &AdminUsersInviteRequest, ) -> Result<AdminUsersInviteResponse, SlackError>

Calls the Slack Web API method admin.users.invite: Invite a user to a workspace.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_list( &self, request: &AdminUsersListRequest, ) -> Result<AdminUsersListResponse, SlackError>

Calls the Slack Web API method admin.users.list: List users on a workspace

Required scopes:

  • user token: admin.users:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_remove( &self, request: &AdminUsersRemoveRequest, ) -> Result<AdminUsersRemoveResponse, SlackError>

Calls the Slack Web API method admin.users.remove: Remove a user from a workspace.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_session_clear_settings( &self, request: &AdminUsersSessionClearSettingsRequest, ) -> Result<AdminUsersSessionClearSettingsResponse, SlackError>

Calls the Slack Web API method admin.users.session.clearSettings: Clear user-specific session settings—the session duration and what happens when the client closes—for a list of users.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_session_get_settings( &self, request: &AdminUsersSessionGetSettingsRequest, ) -> Result<AdminUsersSessionGetSettingsResponse, SlackError>

Calls the Slack Web API method admin.users.session.getSettings: Get user-specific session settings—the session duration and what happens when the client closes—given a list of users.

Required scopes:

  • user token: admin.users:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_session_invalidate( &self, request: &AdminUsersSessionInvalidateRequest, ) -> Result<AdminUsersSessionInvalidateResponse, SlackError>

Calls the Slack Web API method admin.users.session.invalidate: Revoke a single session for a user. The user will be forced to login to Slack.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_session_list( &self, request: &AdminUsersSessionListRequest, ) -> Result<AdminUsersSessionListResponse, SlackError>

Calls the Slack Web API method admin.users.session.list: List active user sessions for an organization

Required scopes:

  • user token: admin.users:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_session_reset( &self, request: &AdminUsersSessionResetRequest, ) -> Result<AdminUsersSessionResetResponse, SlackError>

Calls the Slack Web API method admin.users.session.reset: Wipes all valid sessions on all devices for a given user

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_session_reset_bulk( &self, request: &AdminUsersSessionResetBulkRequest, ) -> Result<AdminUsersSessionResetBulkResponse, SlackError>

Calls the Slack Web API method admin.users.session.resetBulk: Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_session_set_settings( &self, request: &AdminUsersSessionSetSettingsRequest, ) -> Result<AdminUsersSessionSetSettingsResponse, SlackError>

Calls the Slack Web API method admin.users.session.setSettings: Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_set_admin( &self, request: &AdminUsersSetAdminRequest, ) -> Result<AdminUsersSetAdminResponse, SlackError>

Calls the Slack Web API method admin.users.setAdmin: Set an existing regular user or owner to be a workspace or org admin.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_set_expiration( &self, request: &AdminUsersSetExpirationRequest, ) -> Result<AdminUsersSetExpirationResponse, SlackError>

Calls the Slack Web API method admin.users.setExpiration: Set an expiration for a guest user

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_set_owner( &self, request: &AdminUsersSetOwnerRequest, ) -> Result<AdminUsersSetOwnerResponse, SlackError>

Calls the Slack Web API method admin.users.setOwner: Set an existing regular user or admin to be a workspace or org owner.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_set_regular( &self, request: &AdminUsersSetRegularRequest, ) -> Result<AdminUsersSetRegularResponse, SlackError>

Calls the Slack Web API method admin.users.setRegular: Set an existing guest user, admin user, or owner to be a regular user.

Required scopes:

  • user token: admin.users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_users_unsupported_versions_export( &self, request: &AdminUsersUnsupportedVersionsExportRequest, ) -> Result<AdminUsersUnsupportedVersionsExportResponse, SlackError>

Calls the Slack Web API method admin.users.unsupportedVersions.export: Ask Slack to send you an export listing all workspace members using unsupported software, presented as a zipped CSV file.

Required scopes:

  • user token: admin.users:read

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn admin_workflows_collaborators_add( &self, request: &AdminWorkflowsCollaboratorsAddRequest, ) -> Result<AdminWorkflowsCollaboratorsAddResponse, SlackError>

Calls the Slack Web API method admin.workflows.collaborators.add: Add collaborators to workflows within the team or enterprise

Required scopes:

  • user token: admin.workflows:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_workflows_collaborators_remove( &self, request: &AdminWorkflowsCollaboratorsRemoveRequest, ) -> Result<AdminWorkflowsCollaboratorsRemoveResponse, SlackError>

Calls the Slack Web API method admin.workflows.collaborators.remove: Remove collaborators from workflows within the team or enterprise

Required scopes:

  • user token: admin.workflows:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_workflows_permissions_lookup( &self, request: &AdminWorkflowsPermissionsLookupRequest, ) -> Result<AdminWorkflowsPermissionsLookupResponse, SlackError>

Calls the Slack Web API method admin.workflows.permissions.lookup: Look up the permissions for a set of workflows

Required scopes:

  • user token: admin.workflows:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Calls the Slack Web API method admin.workflows.search: Search workflows within the team or enterprise

Required scopes:

  • user token: admin.workflows:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_workflows_triggers_types_permissions_lookup( &self, request: &AdminWorkflowsTriggersTypesPermissionsLookupRequest, ) -> Result<AdminWorkflowsTriggersTypesPermissionsLookupResponse, SlackError>

Calls the Slack Web API method admin.workflows.triggers.types.permissions.lookup: List the permissions for using each trigger type

Required scopes:

  • user token: client

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_workflows_triggers_types_permissions_set( &self, request: &AdminWorkflowsTriggersTypesPermissionsSetRequest, ) -> Result<AdminWorkflowsTriggersTypesPermissionsSetResponse, SlackError>

Calls the Slack Web API method admin.workflows.triggers.types.permissions.set: Set the permissions for using a trigger type

Required scopes:

  • user token: client

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn admin_workflows_unpublish( &self, request: &AdminWorkflowsUnpublishRequest, ) -> Result<AdminWorkflowsUnpublishResponse, SlackError>

Calls the Slack Web API method admin.workflows.unpublish: Unpublish workflows within the team or enterprise

Required scopes:

  • user token: admin.workflows:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn agents_sessions_rename( &self, request: &AgentsSessionsRenameRequest, ) -> Result<AgentsSessionsRenameResponse, SlackError>

Calls the Slack Web API method agents.sessions.rename: Rename an agent session.

Required scopes:

  • bot token: chat:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn agents_sessions_set_status( &self, request: &AgentsSessionsSetStatusRequest, ) -> Result<AgentsSessionsSetStatusResponse, SlackError>

Calls the Slack Web API method agents.sessions.setStatus: Set an agent session’s lifecycle status, creating the session if needed.

Required scopes:

  • bot token: chat:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn api_test( &self, request: &ApiTestRequest, ) -> Result<ApiTestResponse, SlackError>

Calls the Slack Web API method api.test: Checks API calling code.

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn apps_activities_list( &self, request: &AppsActivitiesListRequest, ) -> Result<AppsActivitiesListResponse, SlackError>

Calls the Slack Web API method apps.activities.list: Get logs for a specified app

Required scopes:

  • user token: hosting:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_auth_external_delete( &self, request: &AppsAuthExternalDeleteRequest, ) -> Result<AppsAuthExternalDeleteResponse, SlackError>

Calls the Slack Web API method apps.auth.external.delete: Delete external auth tokens only on the Slack side

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_auth_external_get( &self, request: &AppsAuthExternalGetRequest, ) -> Result<AppsAuthExternalGetResponse, SlackError>

Calls the Slack Web API method apps.auth.external.get: Get the access token for the provided token ID

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_connections_open( &self, request: &AppsConnectionsOpenRequest, ) -> Result<AppsConnectionsOpenResponse, SlackError>

Calls the Slack Web API method apps.connections.open: Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over.

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_datastore_bulk_delete( &self, request: &AppsDatastoreBulkDeleteRequest, ) -> Result<AppsDatastoreBulkDeleteResponse, SlackError>

Calls the Slack Web API method apps.datastore.bulkDelete: Delete items from a datastore in bulk

Required scopes:

  • bot token: datastore:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_datastore_bulk_get( &self, request: &AppsDatastoreBulkGetRequest, ) -> Result<AppsDatastoreBulkGetResponse, SlackError>

Calls the Slack Web API method apps.datastore.bulkGet: Get items from a datastore in bulk

Required scopes:

  • bot token: datastore:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_datastore_bulk_put( &self, request: &AppsDatastoreBulkPutRequest, ) -> Result<AppsDatastoreBulkPutResponse, SlackError>

Calls the Slack Web API method apps.datastore.bulkPut: Creates or replaces existing items in bulk

Required scopes:

  • bot token: datastore:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_datastore_count( &self, request: &AppsDatastoreCountRequest, ) -> Result<AppsDatastoreCountResponse, SlackError>

Calls the Slack Web API method apps.datastore.count: Count the number of items in a datastore that match a query

Required scopes:

  • bot token: datastore:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_datastore_delete( &self, request: &AppsDatastoreDeleteRequest, ) -> Result<AppsDatastoreDeleteResponse, SlackError>

Calls the Slack Web API method apps.datastore.delete: Delete an item from a datastore

Required scopes:

  • bot token: datastore:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_datastore_get( &self, request: &AppsDatastoreGetRequest, ) -> Result<AppsDatastoreGetResponse, SlackError>

Calls the Slack Web API method apps.datastore.get: Get an item from a datastore

Required scopes:

  • bot token: datastore:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_datastore_put( &self, request: &AppsDatastorePutRequest, ) -> Result<AppsDatastorePutResponse, SlackError>

Calls the Slack Web API method apps.datastore.put: Creates a new item, or replaces an old item with a new item.

Required scopes:

  • bot token: datastore:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_datastore_query( &self, request: &AppsDatastoreQueryRequest, ) -> Result<AppsDatastoreQueryResponse, SlackError>

Calls the Slack Web API method apps.datastore.query: Query a datastore for items

Required scopes:

  • bot token: datastore:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_datastore_update( &self, request: &AppsDatastoreUpdateRequest, ) -> Result<AppsDatastoreUpdateResponse, SlackError>

Calls the Slack Web API method apps.datastore.update: Edits an existing item’s attributes, or adds a new item if it does not already exist.

Required scopes:

  • bot token: datastore:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_event_authorizations_list( &self, request: &AppsEventAuthorizationsListRequest, ) -> Result<AppsEventAuthorizationsListResponse, SlackError>

Calls the Slack Web API method apps.event.authorizations.list: Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.

Rate limit: Tier 5 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_icon_set( &self, request: &AppsIconSetRequest, ) -> Result<AppsIconSetResponse, SlackError>

Calls the Slack Web API method apps.icon.set: Sets the app icon

Required scopes:

  • user token: app_configurations:write

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_managed_permissions_set( &self, request: &AppsManagedPermissionsSetRequest, ) -> Result<AppsManagedPermissionsSetResponse, SlackError>

Calls the Slack Web API method apps.managed.permissions.set: Set who can interact with a managed app

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_manifest_create( &self, request: &AppsManifestCreateRequest, ) -> Result<AppsManifestCreateResponse, SlackError>

Calls the Slack Web API method apps.manifest.create: Create an app from an app manifest.

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_manifest_delete( &self, request: &AppsManifestDeleteRequest, ) -> Result<AppsManifestDeleteResponse, SlackError>

Calls the Slack Web API method apps.manifest.delete: Permanently deletes an app created through app manifests

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_manifest_export( &self, request: &AppsManifestExportRequest, ) -> Result<AppsManifestExportResponse, SlackError>

Calls the Slack Web API method apps.manifest.export: Export an app manifest from an existing app

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_manifest_update( &self, request: &AppsManifestUpdateRequest, ) -> Result<AppsManifestUpdateResponse, SlackError>

Calls the Slack Web API method apps.manifest.update: Update an app from an app manifest

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_manifest_validate( &self, request: &AppsManifestValidateRequest, ) -> Result<AppsManifestValidateResponse, SlackError>

Calls the Slack Web API method apps.manifest.validate: Validate an app manifest

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_uninstall( &self, request: &AppsUninstallRequest, ) -> Result<AppsUninstallResponse, SlackError>

Calls the Slack Web API method apps.uninstall: Uninstalls your app from a workspace.

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn apps_user_connection_update( &self, request: &AppsUserConnectionUpdateRequest, ) -> Result<AppsUserConnectionUpdateResponse, SlackError>

Calls the Slack Web API method apps.user.connection.update: Updates the connection status between a user and an app.

Required scopes:

  • user token: users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn assistant_search_context( &self, request: &AssistantSearchContextRequest, ) -> Result<AssistantSearchContextResponse, SlackError>

Calls the Slack Web API method assistant.search.context: Searches messages, files, channels and users across your Slack organization.

Required scopes:

  • bot token: search:read.public, search:read.files, search:read.users
  • user token: search:read.public, search:read.private, search:read.im, search:read.mpim, search:read.files, search:read.users

Rate limit: Tier 5 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn assistant_search_info( &self, request: &AssistantSearchInfoRequest, ) -> Result<AssistantSearchInfoResponse, SlackError>

Calls the Slack Web API method assistant.search.info: Returns search capabilities on a given team.

Required scopes:

  • bot token: search:read.public
  • user token: search:read.public

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn assistant_threads_set_status( &self, request: &AssistantThreadsSetStatusRequest, ) -> Result<AssistantThreadsSetStatusResponse, SlackError>

Calls the Slack Web API method assistant.threads.setStatus: Set the status for an AI assistant thread.

Required scopes:

  • bot token: chat:write

Rate limit: Tier 5 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn assistant_threads_set_suggested_prompts( &self, request: &AssistantThreadsSetSuggestedPromptsRequest, ) -> Result<AssistantThreadsSetSuggestedPromptsResponse, SlackError>

Calls the Slack Web API method assistant.threads.setSuggestedPrompts: Set suggested prompts for the given assistant thread

Required scopes:

  • bot token: assistant:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn assistant_threads_set_title( &self, request: &AssistantThreadsSetTitleRequest, ) -> Result<AssistantThreadsSetTitleResponse, SlackError>

Calls the Slack Web API method assistant.threads.setTitle: Set the title for the given assistant thread

Required scopes:

  • bot token: assistant:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn auth_revoke( &self, request: &AuthRevokeRequest, ) -> Result<AuthRevokeResponse, SlackError>

Calls the Slack Web API method auth.revoke: Revokes a token.

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn auth_teams_list( &self, request: &AuthTeamsListRequest, ) -> Result<AuthTeamsListResponse, SlackError>

Calls the Slack Web API method auth.teams.list: Obtain a full list of workspaces your org-wide app has been approved for.

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn auth_test( &self, request: &AuthTestRequest, ) -> Result<AuthTestResponse, SlackError>

Calls the Slack Web API method auth.test: Checks authentication & identity.

Rate limit: Tier 5 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn blocks_validate( &self, request: &BlocksValidateRequest, ) -> Result<BlocksValidateResponse, SlackError>

Calls the Slack Web API method blocks.validate: Validates blocks, messages, and views Block Kit JSON payloads.

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn bookmarks_add( &self, request: &BookmarksAddRequest, ) -> Result<BookmarksAddResponse, SlackError>

Calls the Slack Web API method bookmarks.add: Add bookmark to a channel.

Required scopes:

  • bot token: bookmarks:write
  • user token: bookmarks:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn bookmarks_edit( &self, request: &BookmarksEditRequest, ) -> Result<BookmarksEditResponse, SlackError>

Calls the Slack Web API method bookmarks.edit: Edit bookmark.

Required scopes:

  • bot token: bookmarks:write
  • user token: bookmarks:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn bookmarks_list( &self, request: &BookmarksListRequest, ) -> Result<BookmarksListResponse, SlackError>

Calls the Slack Web API method bookmarks.list: List bookmark for the channel.

Required scopes:

  • bot token: bookmarks:read
  • user token: bookmarks:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn bookmarks_remove( &self, request: &BookmarksRemoveRequest, ) -> Result<BookmarksRemoveResponse, SlackError>

Calls the Slack Web API method bookmarks.remove: Remove bookmark from the channel.

Required scopes:

  • bot token: bookmarks:write
  • user token: bookmarks:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn bots_info( &self, request: &BotsInfoRequest, ) -> Result<BotsInfoResponse, SlackError>

Calls the Slack Web API method bots.info: Gets information about a bot user.

Required scopes:

  • bot token: users:read
  • user token: users:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn calls_add( &self, request: &CallsAddRequest, ) -> Result<CallsAddResponse, SlackError>

Calls the Slack Web API method calls.add: Registers a new Call.

Required scopes:

  • bot token: calls:write
  • user token: calls:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn calls_end( &self, request: &CallsEndRequest, ) -> Result<CallsEndResponse, SlackError>

Calls the Slack Web API method calls.end: Ends a Call.

Required scopes:

  • bot token: calls:write
  • user token: calls:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn calls_info( &self, request: &CallsInfoRequest, ) -> Result<CallsInfoResponse, SlackError>

Calls the Slack Web API method calls.info: Returns information about a Call.

Required scopes:

  • bot token: calls:read
  • user token: calls:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn calls_participants_add( &self, request: &CallsParticipantsAddRequest, ) -> Result<CallsParticipantsAddResponse, SlackError>

Calls the Slack Web API method calls.participants.add: Registers new participants added to a Call.

Required scopes:

  • bot token: calls:write
  • user token: calls:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn calls_participants_remove( &self, request: &CallsParticipantsRemoveRequest, ) -> Result<CallsParticipantsRemoveResponse, SlackError>

Calls the Slack Web API method calls.participants.remove: Registers participants removed from a Call.

Required scopes:

  • bot token: calls:write
  • user token: calls:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn calls_update( &self, request: &CallsUpdateRequest, ) -> Result<CallsUpdateResponse, SlackError>

Calls the Slack Web API method calls.update: Updates information about a Call.

Required scopes:

  • bot token: calls:write
  • user token: calls:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn canvases_access_delete( &self, request: &CanvasesAccessDeleteRequest, ) -> Result<CanvasesAccessDeleteResponse, SlackError>

Calls the Slack Web API method canvases.access.delete: Remove access to a canvas for specified entities

Required scopes:

  • bot token: canvases:write
  • user token: canvases:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn canvases_access_set( &self, request: &CanvasesAccessSetRequest, ) -> Result<CanvasesAccessSetResponse, SlackError>

Calls the Slack Web API method canvases.access.set: Sets the access level to a canvas for specified entities

Required scopes:

  • bot token: canvases:write
  • user token: canvases:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn canvases_create( &self, request: &CanvasesCreateRequest, ) -> Result<CanvasesCreateResponse, SlackError>

Calls the Slack Web API method canvases.create: Create canvas for a user

Required scopes:

  • bot token: canvases:write
  • user token: canvases:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn canvases_delete( &self, request: &CanvasesDeleteRequest, ) -> Result<CanvasesDeleteResponse, SlackError>

Calls the Slack Web API method canvases.delete: Deletes a canvas

Required scopes:

  • bot token: canvases:write
  • user token: canvases:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn canvases_edit( &self, request: &CanvasesEditRequest, ) -> Result<CanvasesEditResponse, SlackError>

Calls the Slack Web API method canvases.edit: Update an existing canvas

Required scopes:

  • bot token: canvases:write
  • user token: canvases:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn canvases_get_content( &self, request: &CanvasesGetContentRequest, ) -> Result<CanvasesGetContentResponse, SlackError>

Calls the Slack Web API method canvases.getContent: Get the content of a canvas as markdown (default) or HTML.

Required scopes:

  • bot token: canvases:read
  • user token: canvases:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn canvases_sections_lookup( &self, request: &CanvasesSectionsLookupRequest, ) -> Result<CanvasesSectionsLookupResponse, SlackError>

Calls the Slack Web API method canvases.sections.lookup: Find sections matching the provided criteria

Required scopes:

  • bot token: canvases:read
  • user token: canvases:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn chat_append_stream( &self, request: &ChatAppendStreamRequest, ) -> Result<ChatAppendStreamResponse, SlackError>

Calls the Slack Web API method chat.appendStream: Append text to an existing streaming conversation

Required scopes:

  • bot token: chat:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_delete( &self, request: &ChatDeleteRequest, ) -> Result<ChatDeleteResponse, SlackError>

Calls the Slack Web API method chat.delete: Deletes a message.

Required scopes:

  • bot token: chat:write
  • user token: chat:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_delete_scheduled_message( &self, request: &ChatDeleteScheduledMessageRequest, ) -> Result<ChatDeleteScheduledMessageResponse, SlackError>

Calls the Slack Web API method chat.deleteScheduledMessage: Deletes a pending scheduled message from the queue.

Required scopes:

  • bot token: chat:write
  • user token: chat:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Calls the Slack Web API method chat.getPermalink: Retrieve a permalink URL for a specific extant message

Rate limit: Tier 5 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_me_message( &self, request: &ChatMeMessageRequest, ) -> Result<ChatMeMessageResponse, SlackError>

Calls the Slack Web API method chat.meMessage: Share a me message into a channel.

Required scopes:

  • bot token: chat:write
  • user token: chat:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_post_ephemeral( &self, request: &ChatPostEphemeralRequest, ) -> Result<ChatPostEphemeralResponse, SlackError>

Calls the Slack Web API method chat.postEphemeral: Sends an ephemeral message to a user in a channel.

Required scopes:

  • bot token: chat:write
  • user token: chat:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_post_message( &self, request: &ChatPostMessageRequest, ) -> Result<ChatPostMessageResponse, SlackError>

Calls the Slack Web API method chat.postMessage: Sends a message to a channel.

Required scopes:

  • bot token: chat:write
  • user token: chat:write

Rate limit: Tier 5 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_schedule_message( &self, request: &ChatScheduleMessageRequest, ) -> Result<ChatScheduleMessageResponse, SlackError>

Calls the Slack Web API method chat.scheduleMessage: Schedules a message to be sent to a channel.

Required scopes:

  • bot token: chat:write
  • user token: chat:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_scheduled_messages_list( &self, request: &ChatScheduledMessagesListRequest, ) -> Result<ChatScheduledMessagesListResponse, SlackError>

Calls the Slack Web API method chat.scheduledMessages.list: Returns a list of scheduled messages.

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_start_stream( &self, request: &ChatStartStreamRequest, ) -> Result<ChatStartStreamResponse, SlackError>

Calls the Slack Web API method chat.startStream: Start a new streaming conversation

Required scopes:

  • bot token: chat:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_stop_stream( &self, request: &ChatStopStreamRequest, ) -> Result<ChatStopStreamResponse, SlackError>

Calls the Slack Web API method chat.stopStream: Stop a streaming conversation

Required scopes:

  • bot token: chat:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_unfurl( &self, request: &ChatUnfurlRequest, ) -> Result<ChatUnfurlResponse, SlackError>

Calls the Slack Web API method chat.unfurl: Provide custom unfurl behavior for user-posted URLs

Required scopes:

  • bot token: links:write
  • user token: links:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn chat_update( &self, request: &ChatUpdateRequest, ) -> Result<ChatUpdateResponse, SlackError>

Calls the Slack Web API method chat.update: Updates a message.

Required scopes:

  • bot token: chat:write
  • user token: chat:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn conversations_accept_shared_invite( &self, request: &ConversationsAcceptSharedInviteRequest, ) -> Result<ConversationsAcceptSharedInviteResponse, SlackError>

Calls the Slack Web API method conversations.acceptSharedInvite: Accepts an invitation to a Slack Connect channel.

Required scopes:

  • bot token: conversations.connect:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_approve_shared_invite( &self, request: &ConversationsApproveSharedInviteRequest, ) -> Result<ConversationsApproveSharedInviteResponse, SlackError>

Calls the Slack Web API method conversations.approveSharedInvite: Approves an invitation to a Slack Connect channel

Required scopes:

  • bot token: conversations.connect:manage

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_archive( &self, request: &ConversationsArchiveRequest, ) -> Result<ConversationsArchiveResponse, SlackError>

Calls the Slack Web API method conversations.archive: Archives a conversation.

Required scopes:

  • bot token: groups:write, im:write, mpim:write, channels:write, channels:manage
  • user token: groups:write, im:write, mpim:write, channels:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_canvases_create( &self, request: &ConversationsCanvasesCreateRequest, ) -> Result<ConversationsCanvasesCreateResponse, SlackError>

Calls the Slack Web API method conversations.canvases.create: Create a channel canvas for a channel

Required scopes:

  • bot token: canvases:write
  • user token: canvases:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_close( &self, request: &ConversationsCloseRequest, ) -> Result<ConversationsCloseResponse, SlackError>

Calls the Slack Web API method conversations.close: Closes a direct message or multi-person direct message.

Required scopes:

  • bot token: groups:write, im:write, mpim:write, channels:write, channels:manage
  • user token: groups:write, im:write, mpim:write, channels:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_create( &self, request: &ConversationsCreateRequest, ) -> Result<ConversationsCreateResponse, SlackError>

Calls the Slack Web API method conversations.create: Initiates a public or private channel-based conversation

Required scopes:

  • bot token: groups:write, im:write, mpim:write, channels:write, channels:manage
  • user token: groups:write, im:write, mpim:write, channels:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_decline_shared_invite( &self, request: &ConversationsDeclineSharedInviteRequest, ) -> Result<ConversationsDeclineSharedInviteResponse, SlackError>

Calls the Slack Web API method conversations.declineSharedInvite: Declines a Slack Connect channel invite.

Required scopes:

  • bot token: conversations.connect:manage

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_external_invite_permissions_set( &self, request: &ConversationsExternalInvitePermissionsSetRequest, ) -> Result<ConversationsExternalInvitePermissionsSetResponse, SlackError>

Calls the Slack Web API method conversations.externalInvitePermissions.set: Upgrade or downgrade Slack Connect channel permissions between ‘can post only’ and ‘can post and invite’.

Required scopes:

  • bot token: conversations.connect:manage

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_history( &self, request: &ConversationsHistoryRequest, ) -> Result<ConversationsHistoryResponse, SlackError>

Calls the Slack Web API method conversations.history: Fetches a conversation’s history of messages and events.

Required scopes:

  • bot token: groups:history, im:history, mpim:history, channels:history
  • user token: groups:history, im:history, mpim:history, channels:history

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_info( &self, request: &ConversationsInfoRequest, ) -> Result<ConversationsInfoResponse, SlackError>

Calls the Slack Web API method conversations.info: Retrieve information about a conversation.

Required scopes:

  • bot token: groups:read, im:read, mpim:read, channels:read
  • user token: groups:read, im:read, mpim:read, channels:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_invite( &self, request: &ConversationsInviteRequest, ) -> Result<ConversationsInviteResponse, SlackError>

Calls the Slack Web API method conversations.invite: Invites users to a channel.

Required scopes:

  • bot token: channels:write.invites, groups:write.invites, channels:manage, groups:write, im:write, mpim:write
  • user token: channels:write.invites, groups:write.invites, channels:write, groups:write, im:write, mpim:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_invite_shared( &self, request: &ConversationsInviteSharedRequest, ) -> Result<ConversationsInviteSharedResponse, SlackError>

Calls the Slack Web API method conversations.inviteShared: Sends an invitation to a Slack Connect channel

Required scopes:

  • bot token: conversations.connect:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_join( &self, request: &ConversationsJoinRequest, ) -> Result<ConversationsJoinResponse, SlackError>

Calls the Slack Web API method conversations.join: Joins an existing conversation.

Required scopes:

  • bot token: channels:join
  • user token: channels:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_kick( &self, request: &ConversationsKickRequest, ) -> Result<ConversationsKickResponse, SlackError>

Calls the Slack Web API method conversations.kick: Removes a user from a conversation.

Required scopes:

  • bot token: groups:write, channels:manage
  • user token: groups:write, channels:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_leave( &self, request: &ConversationsLeaveRequest, ) -> Result<ConversationsLeaveResponse, SlackError>

Calls the Slack Web API method conversations.leave: Leaves a conversation.

Required scopes:

  • bot token: groups:write, im:write, mpim:write, channels:write, channels:manage
  • user token: groups:write, im:write, mpim:write, channels:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_list( &self, request: &ConversationsListRequest, ) -> Result<ConversationsListResponse, SlackError>

Calls the Slack Web API method conversations.list: Lists all channels in a Slack team.

Required scopes:

  • bot token: groups:read, im:read, mpim:read, channels:read
  • user token: groups:read, im:read, mpim:read, channels:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_list_connect_invites( &self, request: &ConversationsListConnectInvitesRequest, ) -> Result<ConversationsListConnectInvitesResponse, SlackError>

Calls the Slack Web API method conversations.listConnectInvites: Lists shared channel invites that have been generated or received but have not been approved by all parties

Required scopes:

  • bot token: conversations.connect:manage

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_mark( &self, request: &ConversationsMarkRequest, ) -> Result<ConversationsMarkResponse, SlackError>

Calls the Slack Web API method conversations.mark: Sets the read cursor in a channel.

Required scopes:

  • bot token: groups:write, im:write, mpim:write, channels:write, channels:manage
  • user token: groups:write, im:write, mpim:write, channels:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_members( &self, request: &ConversationsMembersRequest, ) -> Result<ConversationsMembersResponse, SlackError>

Calls the Slack Web API method conversations.members: Retrieve members of a conversation.

Required scopes:

  • bot token: groups:read, im:read, mpim:read, channels:read
  • user token: groups:read, im:read, mpim:read, channels:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_open( &self, request: &ConversationsOpenRequest, ) -> Result<ConversationsOpenResponse, SlackError>

Calls the Slack Web API method conversations.open: Opens or resumes a direct message or multi-person direct message.

Required scopes:

  • bot token: channels:manage, groups:write, im:write, mpim:write
  • user token: channels:write, groups:write, im:write, mpim:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_rename( &self, request: &ConversationsRenameRequest, ) -> Result<ConversationsRenameResponse, SlackError>

Calls the Slack Web API method conversations.rename: Renames a conversation.

Required scopes:

  • bot token: groups:write, im:write, mpim:write, channels:write, channels:manage
  • user token: groups:write, im:write, mpim:write, channels:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_replies( &self, request: &ConversationsRepliesRequest, ) -> Result<ConversationsRepliesResponse, SlackError>

Calls the Slack Web API method conversations.replies: Retrieve a thread of messages posted to a conversation

Required scopes:

  • bot token: groups:history, im:history, mpim:history, channels:history
  • user token: groups:history, im:history, mpim:history, channels:history

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_request_shared_invite_approve( &self, request: &ConversationsRequestSharedInviteApproveRequest, ) -> Result<ConversationsRequestSharedInviteApproveResponse, SlackError>

Calls the Slack Web API method conversations.requestSharedInvite.approve: Approves a request to add an external user to a channel and sends them a Slack Connect invite

Required scopes:

  • bot token: conversations.connect:manage

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_request_shared_invite_deny( &self, request: &ConversationsRequestSharedInviteDenyRequest, ) -> Result<ConversationsRequestSharedInviteDenyResponse, SlackError>

Calls the Slack Web API method conversations.requestSharedInvite.deny: Denies a request to invite an external user to a channel

Required scopes:

  • bot token: conversations.connect:manage

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_request_shared_invite_list( &self, request: &ConversationsRequestSharedInviteListRequest, ) -> Result<ConversationsRequestSharedInviteListResponse, SlackError>

Calls the Slack Web API method conversations.requestSharedInvite.list: Lists requests to add external users to channels with ability to filter.

Required scopes:

  • bot token: conversations.connect:manage

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_set_purpose( &self, request: &ConversationsSetPurposeRequest, ) -> Result<ConversationsSetPurposeResponse, SlackError>

Calls the Slack Web API method conversations.setPurpose: Sets the channel description.

Required scopes:

  • bot token: channels:write.topic, groups:write.topic, mpim:write.topic, im:write.topic, channels:manage, groups:write, im:write, mpim:write
  • user token: channels:write.topic, groups:write.topic, mpim:write.topic, im:write.topic, channels:write, groups:write, im:write, mpim:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_set_topic( &self, request: &ConversationsSetTopicRequest, ) -> Result<ConversationsSetTopicResponse, SlackError>

Calls the Slack Web API method conversations.setTopic: Sets the topic for a conversation.

Required scopes:

  • bot token: channels:write.topic, groups:write.topic, mpim:write.topic, im:write.topic, channels:manage, groups:write, im:write, mpim:write
  • user token: channels:write.topic, groups:write.topic, mpim:write.topic, im:write.topic, channels:write, groups:write, im:write, mpim:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn conversations_unarchive( &self, request: &ConversationsUnarchiveRequest, ) -> Result<ConversationsUnarchiveResponse, SlackError>

Calls the Slack Web API method conversations.unarchive: Reverses conversation archival.

Required scopes:

  • bot token: groups:write, im:write, mpim:write, channels:write, channels:manage
  • user token: groups:write, im:write, mpim:write, channels:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn dialog_open( &self, request: &DialogOpenRequest, ) -> Result<DialogOpenResponse, SlackError>

Calls the Slack Web API method dialog.open: Open a dialog with a user

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn dnd_end_dnd( &self, request: &DndEndDndRequest, ) -> Result<DndEndDndResponse, SlackError>

Calls the Slack Web API method dnd.endDnd: Ends the current user’s Do Not Disturb session immediately.

Required scopes:

  • user token: dnd:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn dnd_end_snooze( &self, request: &DndEndSnoozeRequest, ) -> Result<DndEndSnoozeResponse, SlackError>

Calls the Slack Web API method dnd.endSnooze: Ends the current user’s snooze mode immediately.

Required scopes:

  • user token: dnd:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn dnd_info( &self, request: &DndInfoRequest, ) -> Result<DndInfoResponse, SlackError>

Calls the Slack Web API method dnd.info: Retrieves a user’s current Do Not Disturb status.

Required scopes:

  • bot token: dnd:read
  • user token: dnd:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn dnd_set_snooze( &self, request: &DndSetSnoozeRequest, ) -> Result<DndSetSnoozeResponse, SlackError>

Calls the Slack Web API method dnd.setSnooze: Turns on Do Not Disturb mode for the current user, or changes its duration.

Required scopes:

  • user token: dnd:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn dnd_team_info( &self, request: &DndTeamInfoRequest, ) -> Result<DndTeamInfoResponse, SlackError>

Calls the Slack Web API method dnd.teamInfo: Retrieves the Do Not Disturb status for up to 50 users on a team.

Required scopes:

  • bot token: dnd:read
  • user token: dnd:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn emoji_list( &self, request: &EmojiListRequest, ) -> Result<EmojiListResponse, SlackError>

Calls the Slack Web API method emoji.list: Lists custom emoji for a team.

Required scopes:

  • bot token: emoji:read
  • user token: emoji:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn entity_acknowledge_comment_action( &self, request: &EntityAcknowledgeCommentActionRequest, ) -> Result<EntityAcknowledgeCommentActionResponse, SlackError>

Calls the Slack Web API method entity.acknowledgeCommentAction: Acknowledge a comment post, edit, or delete on a Work Object. Apps call this method to confirm they have processed a comment action.

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn entity_present_comments( &self, request: &EntityPresentCommentsRequest, ) -> Result<EntityPresentCommentsResponse, SlackError>

Calls the Slack Web API method entity.presentComments: Provide comments for Work Objects. Apps call this method to send per-user flexpane comment data to the client.

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn entity_present_details( &self, request: &EntityPresentDetailsRequest, ) -> Result<EntityPresentDetailsResponse, SlackError>

Calls the Slack Web API method entity.presentDetails: Provide custom flexpane behavior for Work Objects. Apps call this method to send per-user flexpane metadata to the client.

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn files_comments_delete( &self, request: &FilesCommentsDeleteRequest, ) -> Result<FilesCommentsDeleteResponse, SlackError>

Calls the Slack Web API method files.comments.delete: Deletes an existing comment on a file.

Required scopes:

  • bot token: files:write
  • user token: files:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_complete_upload_external( &self, request: &FilesCompleteUploadExternalRequest, ) -> Result<FilesCompleteUploadExternalResponse, SlackError>

Calls the Slack Web API method files.completeUploadExternal: Finishes an upload started with files.getUploadURLExternal

Required scopes:

  • bot token: files:write
  • user token: files:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_delete( &self, request: &FilesDeleteRequest, ) -> Result<FilesDeleteResponse, SlackError>

Calls the Slack Web API method files.delete: Deletes a file.

Required scopes:

  • bot token: files:write
  • user token: files:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_get_upload_url_external( &self, request: &FilesGetUploadUrlExternalRequest, ) -> Result<FilesGetUploadUrlExternalResponse, SlackError>

Calls the Slack Web API method files.getUploadURLExternal: Gets a URL for an edge external file upload

Required scopes:

  • bot token: files:write
  • user token: files:write

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_info( &self, request: &FilesInfoRequest, ) -> Result<FilesInfoResponse, SlackError>

Calls the Slack Web API method files.info: Gets information about a file.

Required scopes:

  • bot token: files:read
  • user token: files:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_list( &self, request: &FilesListRequest, ) -> Result<FilesListResponse, SlackError>

Calls the Slack Web API method files.list: List for a team, in a channel, or from a user with applied filters.

Required scopes:

  • bot token: files:read
  • user token: files:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_remote_add( &self, request: &FilesRemoteAddRequest, ) -> Result<FilesRemoteAddResponse, SlackError>

Calls the Slack Web API method files.remote.add: Adds a file from a remote service

Required scopes:

  • bot token: remote_files:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_remote_info( &self, request: &FilesRemoteInfoRequest, ) -> Result<FilesRemoteInfoResponse, SlackError>

Calls the Slack Web API method files.remote.info: Retrieve information about a remote file added to Slack

Required scopes:

  • bot token: remote_files:read
  • user token: remote_files:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_remote_list( &self, request: &FilesRemoteListRequest, ) -> Result<FilesRemoteListResponse, SlackError>

Calls the Slack Web API method files.remote.list: Retrieve information about a remote file added to Slack

Required scopes:

  • bot token: remote_files:read
  • user token: remote_files:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_remote_remove( &self, request: &FilesRemoteRemoveRequest, ) -> Result<FilesRemoteRemoveResponse, SlackError>

Calls the Slack Web API method files.remote.remove: Remove a remote file.

Required scopes:

  • bot token: remote_files:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_remote_share( &self, request: &FilesRemoteShareRequest, ) -> Result<FilesRemoteShareResponse, SlackError>

Calls the Slack Web API method files.remote.share: Share a remote file into a channel.

Required scopes:

  • bot token: remote_files:share
  • user token: remote_files:share

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_remote_update( &self, request: &FilesRemoteUpdateRequest, ) -> Result<FilesRemoteUpdateResponse, SlackError>

Calls the Slack Web API method files.remote.update: Updates an existing remote file.

Required scopes:

  • bot token: remote_files:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_revoke_public_url( &self, request: &FilesRevokePublicUrlRequest, ) -> Result<FilesRevokePublicUrlResponse, SlackError>

Calls the Slack Web API method files.revokePublicURL: Revokes public/external sharing access for a file

Required scopes:

  • bot token: files:write
  • user token: files:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn files_shared_public_url( &self, request: &FilesSharedPublicUrlRequest, ) -> Result<FilesSharedPublicUrlResponse, SlackError>

Calls the Slack Web API method files.sharedPublicURL: Enables a file for public/external sharing.

Required scopes:

  • user token: files:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn functions_complete_error( &self, request: &FunctionsCompleteErrorRequest, ) -> Result<FunctionsCompleteErrorResponse, SlackError>

Calls the Slack Web API method functions.completeError: Signal that a function failed to complete

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn functions_complete_success( &self, request: &FunctionsCompleteSuccessRequest, ) -> Result<FunctionsCompleteSuccessResponse, SlackError>

Calls the Slack Web API method functions.completeSuccess: Signal the successful completion of a function

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn functions_distributions_permissions_add( &self, request: &FunctionsDistributionsPermissionsAddRequest, ) -> Result<FunctionsDistributionsPermissionsAddResponse, SlackError>

Calls the Slack Web API method functions.distributions.permissions.add: Grant users access to a custom slack function if its permission_type is set to named_entities

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn functions_distributions_permissions_list( &self, request: &FunctionsDistributionsPermissionsListRequest, ) -> Result<FunctionsDistributionsPermissionsListResponse, SlackError>

Calls the Slack Web API method functions.distributions.permissions.list: List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn functions_distributions_permissions_remove( &self, request: &FunctionsDistributionsPermissionsRemoveRequest, ) -> Result<FunctionsDistributionsPermissionsRemoveResponse, SlackError>

Calls the Slack Web API method functions.distributions.permissions.remove: Revoke user access to a custom slack function if permission_type set to named_entities

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn functions_distributions_permissions_set( &self, request: &FunctionsDistributionsPermissionsSetRequest, ) -> Result<FunctionsDistributionsPermissionsSetResponse, SlackError>

Calls the Slack Web API method functions.distributions.permissions.set: Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn functions_workflows_steps_list( &self, request: &FunctionsWorkflowsStepsListRequest, ) -> Result<FunctionsWorkflowsStepsListResponse, SlackError>

Calls the Slack Web API method functions.workflows.steps.list: List the steps of a specific function of a workflow’s versions

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn functions_workflows_steps_responses_export( &self, request: &FunctionsWorkflowsStepsResponsesExportRequest, ) -> Result<FunctionsWorkflowsStepsResponsesExportResponse, SlackError>

Calls the Slack Web API method functions.workflows.steps.responses.export: Download form responses of a workflow

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn migration_exchange( &self, request: &MigrationExchangeRequest, ) -> Result<MigrationExchangeResponse, SlackError>

Calls the Slack Web API method migration.exchange: For Enterprise organization workspaces, map local user IDs to global user IDs

Required scopes:

  • bot token: tokens.basic
  • user token: tokens.basic

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn oauth_access( &self, request: &OauthAccessRequest, ) -> Result<OauthAccessResponse, SlackError>

Calls the Slack Web API method oauth.access: Exchanges a temporary OAuth verifier code for an access token.

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn oauth_v2_access( &self, request: &OauthV2AccessRequest, ) -> Result<OauthV2AccessResponse, SlackError>

Calls the Slack Web API method oauth.v2.access: Exchanges a temporary OAuth verifier code for an access token.

Rate limit: Tier 5 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn oauth_v2_begin_short_token_rotation( &self, request: &OauthV2BeginShortTokenRotationRequest, ) -> Result<OauthV2BeginShortTokenRotationResponse, SlackError>

Calls the Slack Web API method oauth.v2.beginShortTokenRotation: Begins rotating the secret on an API token with a short secret.

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn oauth_v2_complete_short_token_rotation( &self, request: &OauthV2CompleteShortTokenRotationRequest, ) -> Result<OauthV2CompleteShortTokenRotationResponse, SlackError>

Calls the Slack Web API method oauth.v2.completeShortTokenRotation: Finishes rotating the secret on an API token with a short secret.

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn oauth_v2_exchange( &self, request: &OauthV2ExchangeRequest, ) -> Result<OauthV2ExchangeResponse, SlackError>

Calls the Slack Web API method oauth.v2.exchange: Exchanges a legacy access token for a new expiring access token and refresh token

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn oauth_v2_user_access( &self, request: &OauthV2UserAccessRequest, ) -> Result<OauthV2UserAccessResponse, SlackError>

Calls the Slack Web API method oauth.v2.user.access: Exchanges a temporary OAuth verifier code for a user access token.

Rate limit: Tier 5 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn openid_connect_token( &self, request: &OpenidConnectTokenRequest, ) -> Result<OpenidConnectTokenResponse, SlackError>

Calls the Slack Web API method openid.connect.token: Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack.

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn openid_connect_user_info( &self, request: &OpenidConnectUserInfoRequest, ) -> Result<OpenidConnectUserInfoResponse, SlackError>

Calls the Slack Web API method openid.connect.userInfo: Get the identity of a user who has authorized Sign in with Slack.

Required scopes:

  • user token: openid

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn pins_add( &self, request: &PinsAddRequest, ) -> Result<PinsAddResponse, SlackError>

Calls the Slack Web API method pins.add: Pins an item to a channel.

Required scopes:

  • bot token: pins:write
  • user token: pins:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn pins_list( &self, request: &PinsListRequest, ) -> Result<PinsListResponse, SlackError>

Calls the Slack Web API method pins.list: Lists items pinned to a channel.

Required scopes:

  • bot token: pins:read
  • user token: pins:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn pins_remove( &self, request: &PinsRemoveRequest, ) -> Result<PinsRemoveResponse, SlackError>

Calls the Slack Web API method pins.remove: Un-pins an item from a channel.

Required scopes:

  • bot token: pins:write
  • user token: pins:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn reactions_add( &self, request: &ReactionsAddRequest, ) -> Result<ReactionsAddResponse, SlackError>

Calls the Slack Web API method reactions.add: Adds a reaction to an item.

Required scopes:

  • bot token: reactions:write
  • user token: reactions:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn reactions_get( &self, request: &ReactionsGetRequest, ) -> Result<ReactionsGetResponse, SlackError>

Calls the Slack Web API method reactions.get: Gets reactions for an item.

Required scopes:

  • bot token: reactions:read
  • user token: reactions:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn reactions_list( &self, request: &ReactionsListRequest, ) -> Result<ReactionsListResponse, SlackError>

Calls the Slack Web API method reactions.list: Lists reactions made by a user.

Required scopes:

  • bot token: reactions:read
  • user token: reactions:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn reactions_remove( &self, request: &ReactionsRemoveRequest, ) -> Result<ReactionsRemoveResponse, SlackError>

Calls the Slack Web API method reactions.remove: Removes a reaction from an item.

Required scopes:

  • bot token: reactions:write
  • user token: reactions:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn reminders_add( &self, request: &RemindersAddRequest, ) -> Result<RemindersAddResponse, SlackError>

Calls the Slack Web API method reminders.add: Creates a reminder.

Required scopes:

  • user token: reminders:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn reminders_complete( &self, request: &RemindersCompleteRequest, ) -> Result<RemindersCompleteResponse, SlackError>

Calls the Slack Web API method reminders.complete: Marks a reminder as complete.

Required scopes:

  • user token: reminders:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn reminders_delete( &self, request: &RemindersDeleteRequest, ) -> Result<RemindersDeleteResponse, SlackError>

Calls the Slack Web API method reminders.delete: Deletes a reminder.

Required scopes:

  • user token: reminders:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn reminders_info( &self, request: &RemindersInfoRequest, ) -> Result<RemindersInfoResponse, SlackError>

Calls the Slack Web API method reminders.info: Gets information about a reminder.

Required scopes:

  • user token: reminders:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn reminders_list( &self, request: &RemindersListRequest, ) -> Result<RemindersListResponse, SlackError>

Calls the Slack Web API method reminders.list: Lists all reminders created by or for a given user.

Required scopes:

  • user token: reminders:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn rtm_connect( &self, request: &RtmConnectRequest, ) -> Result<RtmConnectResponse, SlackError>

Calls the Slack Web API method rtm.connect: Starts a Real Time Messaging session.

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn rtm_start( &self, request: &RtmStartRequest, ) -> Result<RtmStartResponse, SlackError>

Calls the Slack Web API method rtm.start: Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead.

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn search_all( &self, request: &SearchAllRequest, ) -> Result<SearchAllResponse, SlackError>

Calls the Slack Web API method search.all: Searches for messages and files matching a query.

Required scopes:

  • user token: search:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn search_files( &self, request: &SearchFilesRequest, ) -> Result<SearchFilesResponse, SlackError>

Calls the Slack Web API method search.files: Searches for files matching a query.

Required scopes:

  • user token: search:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn search_messages( &self, request: &SearchMessagesRequest, ) -> Result<SearchMessagesResponse, SlackError>

Calls the Slack Web API method search.messages: Searches for messages matching a query.

Required scopes:

  • user token: search:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn slack_lists_access_delete( &self, request: &SlackListsAccessDeleteRequest, ) -> Result<SlackListsAccessDeleteResponse, SlackError>

Calls the Slack Web API method slackLists.access.delete: Revoke access to a List for specified entities.

Required scopes:

  • bot token: lists:write
  • user token: lists:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_access_set( &self, request: &SlackListsAccessSetRequest, ) -> Result<SlackListsAccessSetResponse, SlackError>

Calls the Slack Web API method slackLists.access.set: Set the access level to a List for specified entities.

Required scopes:

  • bot token: lists:write
  • user token: lists:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_create( &self, request: &SlackListsCreateRequest, ) -> Result<SlackListsCreateResponse, SlackError>

Calls the Slack Web API method slackLists.create: Create a List.

Required scopes:

  • bot token: lists:write
  • user token: lists:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_download_get( &self, request: &SlackListsDownloadGetRequest, ) -> Result<SlackListsDownloadGetResponse, SlackError>

Calls the Slack Web API method slackLists.download.get: Retrieve List download URL from an export job to download List contents.

Required scopes:

  • bot token: lists:read
  • user token: lists:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_download_start( &self, request: &SlackListsDownloadStartRequest, ) -> Result<SlackListsDownloadStartResponse, SlackError>

Calls the Slack Web API method slackLists.download.start: Initiate a job to export List contents.

Required scopes:

  • bot token: lists:read
  • user token: lists:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_items_create( &self, request: &SlackListsItemsCreateRequest, ) -> Result<SlackListsItemsCreateResponse, SlackError>

Calls the Slack Web API method slackLists.items.create: Add a new item to an existing List.

Required scopes:

  • bot token: lists:write
  • user token: lists:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_items_delete( &self, request: &SlackListsItemsDeleteRequest, ) -> Result<SlackListsItemsDeleteResponse, SlackError>

Calls the Slack Web API method slackLists.items.delete: Deletes an item from an existing List.

Required scopes:

  • bot token: lists:write
  • user token: lists:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_items_delete_multiple( &self, request: &SlackListsItemsDeleteMultipleRequest, ) -> Result<SlackListsItemsDeleteMultipleResponse, SlackError>

Calls the Slack Web API method slackLists.items.deleteMultiple: Deletes multiple items from an existing List.

Required scopes:

  • bot token: lists:write
  • user token: lists:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_items_info( &self, request: &SlackListsItemsInfoRequest, ) -> Result<SlackListsItemsInfoResponse, SlackError>

Calls the Slack Web API method slackLists.items.info: Get a row from a List.

Required scopes:

  • bot token: lists:read
  • user token: lists:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_items_list( &self, request: &SlackListsItemsListRequest, ) -> Result<SlackListsItemsListResponse, SlackError>

Calls the Slack Web API method slackLists.items.list: Get records from a List.

Required scopes:

  • bot token: lists:read
  • user token: lists:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_items_update( &self, request: &SlackListsItemsUpdateRequest, ) -> Result<SlackListsItemsUpdateResponse, SlackError>

Calls the Slack Web API method slackLists.items.update: Updates cells in a List.

Required scopes:

  • bot token: lists:write
  • user token: lists:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn slack_lists_update( &self, request: &SlackListsUpdateRequest, ) -> Result<SlackListsUpdateResponse, SlackError>

Calls the Slack Web API method slackLists.update: Update a List.

Required scopes:

  • bot token: lists:write
  • user token: lists:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn stars_add( &self, request: &StarsAddRequest, ) -> Result<StarsAddResponse, SlackError>

Calls the Slack Web API method stars.add: Save an item for later. Formerly known as adding a star.

Required scopes:

  • user token: stars:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn stars_list( &self, request: &StarsListRequest, ) -> Result<StarsListResponse, SlackError>

Calls the Slack Web API method stars.list: Listed a user’s saved items, formerly known as stars.

Required scopes:

  • user token: stars:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn stars_remove( &self, request: &StarsRemoveRequest, ) -> Result<StarsRemoveResponse, SlackError>

Calls the Slack Web API method stars.remove: Removes a saved item (star) from an item.

Required scopes:

  • user token: stars:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn team_access_logs( &self, request: &TeamAccessLogsRequest, ) -> Result<TeamAccessLogsResponse, SlackError>

Calls the Slack Web API method team.accessLogs: Gets the access logs for the current team.

Required scopes:

  • user token: admin

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn team_billable_info( &self, request: &TeamBillableInfoRequest, ) -> Result<TeamBillableInfoResponse, SlackError>

Calls the Slack Web API method team.billableInfo: Gets billable users information for the current team.

Required scopes:

  • user token: admin

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn team_billing_info( &self, request: &TeamBillingInfoRequest, ) -> Result<TeamBillingInfoResponse, SlackError>

Calls the Slack Web API method team.billing.info: Reads a workspace’s billing plan information.

Required scopes:

  • bot token: team.billing:read
  • user token: team.billing:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn team_external_teams_disconnect( &self, request: &TeamExternalTeamsDisconnectRequest, ) -> Result<TeamExternalTeamsDisconnectResponse, SlackError>

Calls the Slack Web API method team.externalTeams.disconnect: Disconnect an external organization.

Required scopes:

  • bot token: conversations.connect:manage

Rate limit: Tier 1 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn team_external_teams_list( &self, request: &TeamExternalTeamsListRequest, ) -> Result<TeamExternalTeamsListResponse, SlackError>

Calls the Slack Web API method team.externalTeams.list: Returns a list of all the external teams connected and details about the connection.

Required scopes:

  • bot token: conversations.connect:manage, team:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn team_info( &self, request: &TeamInfoRequest, ) -> Result<TeamInfoResponse, SlackError>

Calls the Slack Web API method team.info: Gets information about the current team.

Required scopes:

  • bot token: team:read
  • user token: team:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn team_integration_logs( &self, request: &TeamIntegrationLogsRequest, ) -> Result<TeamIntegrationLogsResponse, SlackError>

Calls the Slack Web API method team.integrationLogs: Gets the integration logs for the current team.

Required scopes:

  • user token: admin

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn team_preferences_list( &self, request: &TeamPreferencesListRequest, ) -> Result<TeamPreferencesListResponse, SlackError>

Calls the Slack Web API method team.preferences.list: Retrieve a list of a workspace’s team preferences.

Required scopes:

  • bot token: team.preferences:read
  • user token: team.preferences:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn team_profile_get( &self, request: &TeamProfileGetRequest, ) -> Result<TeamProfileGetResponse, SlackError>

Calls the Slack Web API method team.profile.get: Retrieve a team’s profile.

Required scopes:

  • bot token: users.profile:read
  • user token: users.profile:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn tooling_tokens_rotate( &self, request: &ToolingTokensRotateRequest, ) -> Result<ToolingTokensRotateResponse, SlackError>

Calls the Slack Web API method tooling.tokens.rotate: Exchanges a refresh token for a new app configuration token.

Rate limit: Tier 5 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn usergroups_create( &self, request: &UsergroupsCreateRequest, ) -> Result<UsergroupsCreateResponse, SlackError>

Calls the Slack Web API method usergroups.create: Create a User Group.

Required scopes:

  • bot token: usergroups:write
  • user token: usergroups:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn usergroups_disable( &self, request: &UsergroupsDisableRequest, ) -> Result<UsergroupsDisableResponse, SlackError>

Calls the Slack Web API method usergroups.disable: Disable an existing User Group.

Required scopes:

  • bot token: usergroups:write
  • user token: usergroups:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn usergroups_enable( &self, request: &UsergroupsEnableRequest, ) -> Result<UsergroupsEnableResponse, SlackError>

Calls the Slack Web API method usergroups.enable: Enable a User Group.

Required scopes:

  • bot token: usergroups:write
  • user token: usergroups:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn usergroups_list( &self, request: &UsergroupsListRequest, ) -> Result<UsergroupsListResponse, SlackError>

Calls the Slack Web API method usergroups.list: List all User Groups for a team.

Required scopes:

  • bot token: usergroups:read
  • user token: usergroups:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn usergroups_update( &self, request: &UsergroupsUpdateRequest, ) -> Result<UsergroupsUpdateResponse, SlackError>

Calls the Slack Web API method usergroups.update: Update an existing User Group.

Required scopes:

  • bot token: usergroups:write
  • user token: usergroups:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn usergroups_users_list( &self, request: &UsergroupsUsersListRequest, ) -> Result<UsergroupsUsersListResponse, SlackError>

Calls the Slack Web API method usergroups.users.list: List all users in a User Group.

Required scopes:

  • bot token: usergroups:read
  • user token: usergroups:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn usergroups_users_update( &self, request: &UsergroupsUsersUpdateRequest, ) -> Result<UsergroupsUsersUpdateResponse, SlackError>

Calls the Slack Web API method usergroups.users.update: Update the list of users for a user group.

Required scopes:

  • bot token: usergroups:write
  • user token: usergroups:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn users_conversations( &self, request: &UsersConversationsRequest, ) -> Result<UsersConversationsResponse, SlackError>

Calls the Slack Web API method users.conversations: List conversations the calling user is a member of.

Required scopes:

  • bot token: groups:read, im:read, mpim:read, channels:read
  • user token: groups:read, im:read, mpim:read, channels:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_delete_photo( &self, request: &UsersDeletePhotoRequest, ) -> Result<UsersDeletePhotoResponse, SlackError>

Calls the Slack Web API method users.deletePhoto: Delete the user profile photo

Required scopes:

  • user token: users.profile:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_discoverable_contacts_lookup( &self, request: &UsersDiscoverableContactsLookupRequest, ) -> Result<UsersDiscoverableContactsLookupResponse, SlackError>

Calls the Slack Web API method users.discoverableContacts.lookup: Look up an email address to see if someone is discoverable on Slack

Required scopes:

  • bot token: conversations.connect:manage, team:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_get_presence( &self, request: &UsersGetPresenceRequest, ) -> Result<UsersGetPresenceResponse, SlackError>

Calls the Slack Web API method users.getPresence: Gets user presence information.

Required scopes:

  • bot token: users:read
  • user token: users:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_identity( &self, request: &UsersIdentityRequest, ) -> Result<UsersIdentityResponse, SlackError>

Calls the Slack Web API method users.identity: Get a user’s identity.

Required scopes:

  • user token: identity:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_info( &self, request: &UsersInfoRequest, ) -> Result<UsersInfoResponse, SlackError>

Calls the Slack Web API method users.info: Gets information about a user.

Required scopes:

  • bot token: users:read
  • user token: users:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_list( &self, request: &UsersListRequest, ) -> Result<UsersListResponse, SlackError>

Calls the Slack Web API method users.list: Lists all users in a Slack team.

Required scopes:

  • bot token: users:read
  • user token: users:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_lookup_by_email( &self, request: &UsersLookupByEmailRequest, ) -> Result<UsersLookupByEmailResponse, SlackError>

Calls the Slack Web API method users.lookupByEmail: Find a user with an email address.

Required scopes:

  • bot token: users:read.email
  • user token: users:read.email

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_profile_get( &self, request: &UsersProfileGetRequest, ) -> Result<UsersProfileGetResponse, SlackError>

Calls the Slack Web API method users.profile.get: Retrieve a user’s profile information, including their custom status.

Required scopes:

  • bot token: users.profile:read
  • user token: users.profile:read

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_profile_set( &self, request: &UsersProfileSetRequest, ) -> Result<UsersProfileSetResponse, SlackError>

Calls the Slack Web API method users.profile.set: Set a user’s profile information, including custom status.

Required scopes:

  • user token: users.profile:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_set_active( &self, request: &UsersSetActiveRequest, ) -> Result<UsersSetActiveResponse, SlackError>

Calls the Slack Web API method users.setActive: Marked a user as active. Deprecated and non-functional.

Required scopes:

  • bot token: users:write
  • user token: users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_set_photo( &self, request: &UsersSetPhotoRequest, ) -> Result<UsersSetPhotoResponse, SlackError>

Calls the Slack Web API method users.setPhoto: Set the user profile photo

Required scopes:

  • user token: users.profile:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn users_set_presence( &self, request: &UsersSetPresenceRequest, ) -> Result<UsersSetPresenceResponse, SlackError>

Calls the Slack Web API method users.setPresence: Manually sets user presence.

Required scopes:

  • bot token: users:write
  • user token: users:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub async fn views_open( &self, request: &ViewsOpenRequest, ) -> Result<ViewsOpenResponse, SlackError>

Calls the Slack Web API method views.open: Open a view for a user.

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn views_publish( &self, request: &ViewsPublishRequest, ) -> Result<ViewsPublishResponse, SlackError>

Calls the Slack Web API method views.publish: Publish a static view for a User.

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn views_push( &self, request: &ViewsPushRequest, ) -> Result<ViewsPushResponse, SlackError>

Calls the Slack Web API method views.push: Push a view onto the stack of a root view.

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn views_update( &self, request: &ViewsUpdateRequest, ) -> Result<ViewsUpdateResponse, SlackError>

Calls the Slack Web API method views.update: Update an existing view.

Rate limit: Tier 4 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Calls the Slack Web API method workflows.featured.add: Add featured workflows to a channel.

Required scopes:

  • bot token: bookmarks:write
  • user token: bookmarks:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Calls the Slack Web API method workflows.featured.list: List the featured workflows for specified channels.

Required scopes:

  • bot token: bookmarks:read
  • user token: bookmarks:read

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Calls the Slack Web API method workflows.featured.remove: Remove featured workflows from a channel.

Required scopes:

  • bot token: bookmarks:write
  • user token: bookmarks:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Calls the Slack Web API method workflows.featured.set: Set featured workflows for a channel.

Required scopes:

  • bot token: bookmarks:write
  • user token: bookmarks:write

Rate limit: Tier 2 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn workflows_triggers_permissions_add( &self, request: &WorkflowsTriggersPermissionsAddRequest, ) -> Result<WorkflowsTriggersPermissionsAddResponse, SlackError>

Calls the Slack Web API method workflows.triggers.permissions.add: Allows users to run a trigger that has its permission type set to named_entities

Required scopes:

  • bot token: triggers:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn workflows_triggers_permissions_list( &self, request: &WorkflowsTriggersPermissionsListRequest, ) -> Result<WorkflowsTriggersPermissionsListResponse, SlackError>

Calls the Slack Web API method workflows.triggers.permissions.list: Returns the permission type of a trigger and if applicable, includes the entities that have been granted access

Required scopes:

  • bot token: triggers:read

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn workflows_triggers_permissions_remove( &self, request: &WorkflowsTriggersPermissionsRemoveRequest, ) -> Result<WorkflowsTriggersPermissionsRemoveResponse, SlackError>

Calls the Slack Web API method workflows.triggers.permissions.remove: Revoke an entity’s access to a trigger that has its permission type set to named_entities

Required scopes:

  • bot token: triggers:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source

pub async fn workflows_triggers_permissions_set( &self, request: &WorkflowsTriggersPermissionsSetRequest, ) -> Result<WorkflowsTriggersPermissionsSetResponse, SlackError>

Calls the Slack Web API method workflows.triggers.permissions.set: Set the permission type for who can run a trigger

Required scopes:

  • bot token: triggers:write

Rate limit: Tier 3 (https://docs.slack.dev/apis/web-api/rate-limits).

§Errors

Returns SlackError::Api when Slack answers "ok": false; see SlackClient::call for the other cases.

Source§

impl SlackClient

Source

pub fn new(token: impl Into<String>) -> Self

Creates a client that authenticates with token (xoxb-, xoxp-, …), with a 30 second request timeout and no retry on HTTP 429.

§Panics

When the TLS backend cannot be initialized, like reqwest::Client::new().

Source

pub fn builder() -> SlackClientBuilder

Source

pub fn with_token(&self, token: impl Into<String>) -> Self

Returns a client that uses another token but shares this client’s connection pool and settings. Useful for apps installed in many workspaces.

Source

pub async fn call<M: SlackApiMethod>( &self, request: &M, ) -> Result<M::Response, SlackError>

Calls a method with a typed request. The per-method functions such as chat_post_message call this.

§Errors

Returns SlackError::Api when Slack answers "ok": false, SlackError::RateLimited when 429 persists past the retry limit, and transport, HTTP or decode errors otherwise.

Source

pub async fn call_raw<P: Serialize + ?Sized>( &self, method: &str, params: &P, ) -> Result<Value, SlackError>

Calls a method by name with arbitrary parameters and returns the raw JSON. Use it for methods or arguments that the generated types do not cover yet.

§Errors

Same as SlackClient::call, plus SlackError::Encode when params is not a struct or map.

let value = client
    .call_raw("chat.postMessage", &serde_json::json!({"channel": "C0123456789", "text": "hi"}))
    .await?;
println!("{}", value["ts"]);
Source

pub fn pages<M: CursorPaginated>(&self, request: M) -> Pages<'_, M>

Iterates over the pages of a cursor-paginated method. Drive it with while let Some(page) = pages.next_page().await.

Source§

impl SlackClient

Source

pub async fn upload_files( &self, files: Vec<FileUpload>, destination: UploadDestination, ) -> Result<FilesCompleteUploadExternalResponse, SlackError>

Uploads files and shares them to destination, replacing the retired files.upload.

Runs files.getUploadURLExternal and the upload for every file concurrently, then files.completeUploadExternal once with the files in the given order.

§Errors

Fails on the first API, transport or upload (non-2xx) error. Files uploaded before the error are not completed and are discarded by Slack.

Trait Implementations§

Source§

impl Clone for SlackClient

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SlackClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more