slack_transfer._base.CommonDryRunClient#
- class slack_transfer._base.CommonDryRunClient(token: Optional[str] = None, base_url: str = 'https://www.slack.com/api/', timeout: int = 30, ssl: Optional[SSLContext] = None, proxy: Optional[str] = None, headers: Optional[dict] = None, user_agent_prefix: Optional[str] = None, user_agent_suffix: Optional[str] = None, team_id: Optional[str] = None, logger: Optional[Logger] = None, retry_handlers: Optional[List[RetryHandler]] = None)[source]#
This class is generated to run dry-run operation. Inherit
slack_sdk.WebClient.- Parameters
token (str; Optional) – A string specifying an xoxp-* or xoxb-* token.
base_url (str; Optional) – A string representing the Slack API base URL. Default is ‘https://www.slack.com/api/’
timeout (int; Optional) – The maximum number of seconds the client will wait to connect and receive a response from Slack. Default is 30 seconds.
ssl (SSLContext; Optional) – An [ssl.SSLContext][1] instance, helpful for specifying your own custom certificate chain.
proxy (str; Optional) – String representing a fully-qualified URL to a proxy through which to route all requests to the Slack API. Even if this parameter is not specified, if any of the following environment variables are present, they will be loaded into this parameter: HTTPS_PROXY, https_proxy, HTTP_PROXY or http_proxy.
headers (dict; Optional) – Additional request headers to attach to all requests.
See also
CommonDryRunClient.get_channels_list:slack_transfer.functions.common.get_channels_list()CommonDryRunClient.get_replies:slack_transfer.functions.common.get_replies()CommonDryRunClient.get_file_volumes:slack_transfer.functions.common.get_file_volumes()
- __init__(token: Optional[str] = None, base_url: str = 'https://www.slack.com/api/', timeout: int = 30, ssl: Optional[SSLContext] = None, proxy: Optional[str] = None, headers: Optional[dict] = None, user_agent_prefix: Optional[str] = None, user_agent_suffix: Optional[str] = None, team_id: Optional[str] = None, logger: Optional[Logger] = None, retry_handlers: Optional[List[RetryHandler]] = None)#
Methods
__init__([token, base_url, timeout, ssl, ...])admin_analytics_getFile(*, type[, date, ...])Retrieve analytics data for a given date, presented as a compressed JSON file https://api.slack.com/methods/admin.analytics.getFile
admin_apps_approve(*[, app_id, request_id, ...])Approve an app for installation on a workspace.
admin_apps_approved_list(*[, cursor, limit, ...])List approved apps for an org or workspace.
admin_apps_clearResolution(*, app_id[, ...])Clear an app resolution https://api.slack.com/methods/admin.apps.clearResolution
admin_apps_requests_cancel(*, request_id[, ...])List app requests for a team/workspace.
admin_apps_requests_list(*[, cursor, limit, ...])List app requests for a team/workspace.
admin_apps_restrict(*[, app_id, request_id, ...])Restrict an app for installation on a workspace.
admin_apps_restricted_list(*[, cursor, ...])List restricted apps for an org or workspace.
admin_apps_uninstall(*, app_id[, ...])Uninstall an app from one or many workspaces, or an entire enterprise organization.
admin_auth_policy_assignEntities(*, ...)Assign entities to a particular authentication policy.
admin_auth_policy_getEntities(*, policy_name)Fetch all the entities assigned to a particular authentication policy by name.
admin_auth_policy_removeEntities(*, ...)Remove specified entities from a specified authentication policy.
admin_barriers_create(*, ...)Create an Information Barrier https://api.slack.com/methods/admin.barriers.create
admin_barriers_delete(*, barrier_id, **kwargs)Delete an existing Information Barrier https://api.slack.com/methods/admin.barriers.delete
admin_barriers_list(*[, cursor, limit])Get all Information Barriers for your organization https://api.slack.com/methods/admin.barriers.list
admin_barriers_update(*, barrier_id, ...)Update an existing Information Barrier https://api.slack.com/methods/admin.barriers.update
admin_conversations_archive(*, channel_id, ...)Archive a public or private channel.
admin_conversations_convertToPrivate(*, ...)Convert a public channel to a private channel.
admin_conversations_create(*, is_private, name)Create a public or private channel-based conversation.
admin_conversations_delete(*, channel_id, ...)Delete a public or private channel.
admin_conversations_disconnectShared(*, ...)Disconnect a connected channel from one or more workspaces.
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.
admin_conversations_getConversationPrefs(*, ...)Get conversation preferences for a public or private channel.
admin_conversations_getCustomRetention(*, ...)Get a channel's retention policy https://api.slack.com/methods/admin.conversations.getCustomRetention
admin_conversations_getTeams(*, channel_id)Set the workspaces in an Enterprise grid org that connect to a channel.
admin_conversations_invite(*, channel_id, ...)Invite a user to a public or private channel.
admin_conversations_removeCustomRetention(*, ...)Remove a channel's retention policy https://api.slack.com/methods/admin.conversations.removeCustomRetention
admin_conversations_rename(*, channel_id, ...)Rename a public or private channel.
admin_conversations_restrictAccess_addGroup(*, ...)Add an allowlist of IDP groups for accessing a channel.
admin_conversations_restrictAccess_listGroups(*, ...)List all IDP Groups linked to a channel.
admin_conversations_restrictAccess_removeGroup(*, ...)Remove a linked IDP group linked from a private channel.
admin_conversations_search(*[, cursor, ...])Search for public or private channels in an Enterprise organization.
admin_conversations_setConversationPrefs(*, ...)Set the posting permissions for a public or private channel.
admin_conversations_setCustomRetention(*, ...)Set a channel's retention policy https://api.slack.com/methods/admin.conversations.setCustomRetention
admin_conversations_setTeams(*, channel_id)Set the workspaces in an Enterprise grid org that connect to a public or private channel.
admin_conversations_unarchive(*, channel_id, ...)Unarchive a public or private channel.
admin_emoji_add(*, name, url, **kwargs)Add an emoji.
admin_emoji_addAlias(*, alias_for, name, ...)Add an emoji alias.
admin_emoji_list(*[, cursor, limit])List emoji for an Enterprise Grid organization.
admin_emoji_remove(*, name, **kwargs)Remove an emoji across an Enterprise Grid organization.
admin_emoji_rename(*, name, new_name, **kwargs)Rename an emoji.
admin_inviteRequests_approve(*, ...[, team_id])Approve a workspace invite request.
admin_inviteRequests_approved_list(*[, ...])List all approved workspace invite requests.
admin_inviteRequests_denied_list(*[, ...])List all denied workspace invite requests.
admin_inviteRequests_deny(*, invite_request_id)Deny a workspace invite request.
admin_inviteRequests_list(**kwargs)List all pending workspace invite requests.
admin_teams_admins_list(*, team_id[, ...])List all of the admins on a given workspace.
admin_teams_create(*, team_domain, team_name)Create an Enterprise team.
admin_teams_list(*[, cursor, limit])List all teams on an Enterprise organization.
admin_teams_owners_list(*, team_id[, ...])List all of the admins on a given workspace.
admin_teams_settings_info(*, team_id, **kwargs)Fetch information about settings in a workspace https://api.slack.com/methods/admin.teams.settings.info
admin_teams_settings_setDefaultChannels(*, ...)Set the default channels of a workspace.
admin_teams_settings_setDescription(*, ...)Set the description of a given workspace.
admin_teams_settings_setDiscoverability(*, ...)Sets the icon of a workspace.
admin_teams_settings_setIcon(*, team_id, ...)Sets the icon of a workspace.
admin_teams_settings_setName(*, team_id, ...)Sets the icon of a workspace.
admin_usergroups_addChannels(*, channel_ids, ...)Add one or more default channels to an IDP group.
admin_usergroups_addTeams(*, usergroup_id, ...)Associate one or more default workspaces with an organization-wide IDP group.
admin_usergroups_listChannels(*, usergroup_id)Add one or more default channels to an IDP group.
admin_usergroups_removeChannels(*, ...)Add one or more default channels to an IDP group.
admin_users_assign(*, team_id, user_id[, ...])Add an Enterprise user to a workspace.
admin_users_invite(*, team_id, email, ...[, ...])Invite a user to a workspace.
admin_users_list(*, team_id[, cursor, limit])List users on a workspace https://api.slack.com/methods/admin.users.list
admin_users_remove(*, team_id, user_id, **kwargs)Remove a user from a workspace.
admin_users_session_clearSettings(*, ...)Clear user-specific session settings—the session duration and what happens when the client closes—for a list of users.
admin_users_session_getSettings(*, user_ids, ...)Get user-specific session settings—the session duration and what happens when the client closes—given a list of users.
admin_users_session_invalidate(*, ...)Invalidate a single session for a user by session_id.
admin_users_session_list(*[, cursor, limit, ...])Lists all active user sessions for an organization https://api.slack.com/methods/admin.users.session.list
admin_users_session_reset(*, user_id[, ...])Wipes all valid sessions on all devices for a given user.
admin_users_session_resetBulk(*, user_ids[, ...])Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users https://api.slack.com/methods/admin.users.session.resetBulk
admin_users_session_setSettings(*, user_ids)Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users.
admin_users_setAdmin(*, team_id, user_id, ...)Set an existing guest, regular user, or owner to be an admin user.
admin_users_setExpiration(*, expiration_ts, ...)Set an expiration for a guest user.
admin_users_setOwner(*, team_id, user_id, ...)Set an existing guest, regular user, or admin user to be a workspace owner.
admin_users_setRegular(*, team_id, user_id, ...)Set an existing guest user, admin user, or owner to be a regular user.
admin_users_unsupportedVersions_export(*[, ...])Ask Slackbot to send you an export listing all workspace members using unsupported software, presented as a zipped CSV file.
api_call(api_method, *[, http_verb, files, ...])Create a request and execute the API call to Slack.
api_test(*[, error])Checks API calling code.
apps_connections_open(*, app_token, **kwargs)Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads https://api.slack.com/methods/apps.connections.open
apps_event_authorizations_list(*, event_context)Get a list of authorizations for the given event context.
apps_uninstall(*, client_id, client_secret, ...)Uninstalls your app from a workspace.
auth_revoke(*[, test])Revokes a token.
auth_teams_list([cursor, limit, include_icon])List the workspaces a token can access.
auth_test(**kwargs)Checks authentication & identity.
bookmarks_add(*, channel_id, title, type[, ...])Add bookmark to a channel.
bookmarks_edit(*, bookmark_id, channel_id[, ...])Edit bookmark.
bookmarks_list(*, channel_id, **kwargs)List bookmark for the channel.
bookmarks_remove(*, bookmark_id, channel_id, ...)Remove bookmark from the channel.
bots_info(*[, bot, team_id])Gets information about a bot user.
calls_add(*, external_unique_id, join_url[, ...])Registers a new Call.
calls_end(*, id[, duration])Ends a Call.
calls_info(*, id, **kwargs)Returns information about a Call.
calls_participants_add(*, id, users, **kwargs)Registers new participants added to a Call.
calls_participants_remove(*, id, users, **kwargs)Registers participants removed from a Call.
calls_update(*, id[, desktop_app_join_url, ...])Updates information about a Call.
channels_archive(*, channel, **kwargs)Archives a channel.
channels_create(*, name, **kwargs)Creates a channel.
channels_history(*, channel, **kwargs)Fetches history of messages and events from a channel.
channels_info(*, channel, **kwargs)Gets information about a channel.
channels_invite(*, channel, user, **kwargs)Invites a user to a channel.
channels_join(*, name, **kwargs)Joins a channel, creating it if needed.
channels_kick(*, channel, user, **kwargs)Removes a user from a channel.
channels_leave(*, channel, **kwargs)Leaves a channel.
channels_list(**kwargs)Lists all channels in a Slack team.
channels_mark(*, channel, ts, **kwargs)Sets the read cursor in a channel.
channels_rename(*, channel, name, **kwargs)Renames a channel.
channels_replies(*, channel, thread_ts, **kwargs)Retrieve a thread of messages posted to a channel
channels_setPurpose(*, channel, purpose, ...)Sets the purpose for a channel.
channels_setTopic(*, channel, topic, **kwargs)Sets the topic for a channel.
channels_unarchive(*, channel, **kwargs)Unarchives a channel.
chat_delete(*, channel, ts[, as_user])Deletes a message.
chat_deleteScheduledMessage(*, channel, ...)Deletes a scheduled message.
chat_getPermalink(*, channel, message_ts, ...)Retrieve a permalink URL for a specific extant message https://api.slack.com/methods/chat.getPermalink
chat_meMessage(*, channel, text, **kwargs)Share a me message into a channel.
chat_postEphemeral(*, channel, user[, text, ...])Sends an ephemeral message to a user in a channel.
chat_postMessage(*, channel[, text, ...])Sends a message to a channel.
chat_scheduleMessage(*, channel, post_at, text)Schedules a message.
chat_scheduledMessages_list(*[, channel, ...])Lists all scheduled messages.
chat_unfurl(*[, channel, ts, source, ...])Provide custom unfurl behavior for user-posted URLs.
chat_update(*, channel, ts[, text, ...])Updates a message in a channel.
conversations_acceptSharedInvite(*, channel_name)Accepts an invitation to a Slack Connect channel.
conversations_approveSharedInvite(*, invite_id)Approves an invitation to a Slack Connect channel.
conversations_archive(*, channel, **kwargs)Archives a conversation.
conversations_close(*, channel, **kwargs)Closes a direct message or multi-person direct message.
conversations_create(*, name[, is_private, ...])Initiates a public or private channel-based conversation https://api.slack.com/methods/conversations.create
conversations_declineSharedInvite(*, invite_id)Declines a Slack Connect channel invite.
conversations_history(*, channel[, cursor, ...])Fetches a conversation's history of messages and events.
conversations_info(*, channel[, ...])Retrieve information about a conversation.
conversations_invite(*, channel, users, **kwargs)Invites users to a channel.
conversations_inviteShared(*, channel[, ...])Sends an invitation to a Slack Connect channel.
conversations_join(*, channel, **kwargs)Joins an existing conversation.
conversations_kick(*, channel, user, **kwargs)Removes a user from a conversation.
conversations_leave(*, channel, **kwargs)Leaves a conversation.
conversations_list(*[, cursor, ...])Lists all channels in a Slack team.
conversations_listConnectInvites(*[, count, ...])List shared channel invites that have been generated or received but have not yet been approved by all parties.
conversations_mark(*, channel, ts, **kwargs)Sets the read cursor in a channel.
conversations_members(*, channel[, cursor, ...])Retrieve members of a conversation.
conversations_open(*[, channel, return_im, ...])Opens or resumes a direct message or multi-person direct message.
conversations_rename(*, channel, name, **kwargs)Renames a conversation.
conversations_replies(*, channel, ts[, ...])Retrieve a thread of messages posted to a conversation https://api.slack.com/methods/conversations.replies
conversations_setPurpose(*, channel, ...)Sets the purpose for a conversation.
conversations_setTopic(*, channel, topic, ...)Sets the topic for a conversation.
conversations_unarchive(*, channel, **kwargs)Reverses conversation archival.
dialog_open(*, dialog, trigger_id, **kwargs)Open a dialog with a user.
dnd_endDnd(**kwargs)Ends the current user's Do Not Disturb session immediately.
dnd_endSnooze(**kwargs)Ends the current user's snooze mode immediately.
dnd_info(*[, team_id, user])Retrieves a user's current Do Not Disturb status.
dnd_setSnooze(*, num_minutes, **kwargs)Turns on Do Not Disturb mode for the current user, or changes its duration.
dnd_teamInfo(users[, team_id])Retrieves the Do Not Disturb status for users on a team.
emoji_list(**kwargs)Lists custom emoji for a team.
files_comments_delete(*, file, id, **kwargs)Deletes an existing comment on a file.
files_delete(*, file, **kwargs)Deletes a file.
files_info(*, file[, count, cursor, limit, page])Gets information about a team file.
files_list(*[, channel, count, page, ...])Lists & filters team files.
files_remote_add(*, external_id, ...[, ...])Adds a file from a remote service.
files_remote_info(*[, external_id, file])Retrieve information about a remote file added to Slack.
files_remote_list(*[, channel, cursor, ...])Retrieve information about a remote file added to Slack.
files_remote_remove(*[, external_id, file])Remove a remote file.
files_remote_share(*, channels[, ...])Share a remote file into a channel.
files_remote_update(*[, external_id, ...])Updates an existing remote file.
files_revokePublicURL(*, file, **kwargs)Revokes public/external sharing access for a file https://api.slack.com/methods/files.revokePublicURL
files_sharedPublicURL(*, file, **kwargs)Enables a file for public/external sharing.
files_upload(*[, file, content, filename, ...])Uploads or creates a file.
get_channels_list()get channel list
slack_transfer.functions.common.get_channels_list()get_file_volumes([channel_ids])calculate rough volume for files which will be downloaded (Dry-run mode)
slack_transfer.functions.common.get_file_volumes()get_replies(channel_id, ts)get replies for a message
slack_transfer.functions.common.get_replies()groups_archive(*, channel, **kwargs)Archives a private channel.
groups_create(*, name, **kwargs)Creates a private channel.
groups_createChild(*, channel, **kwargs)Clones and archives a private channel.
groups_history(*, channel, **kwargs)Fetches history of messages and events from a private channel.
groups_info(*, channel, **kwargs)Gets information about a private channel.
groups_invite(*, channel, user, **kwargs)Invites a user to a private channel.
groups_kick(*, channel, user, **kwargs)Removes a user from a private channel.
groups_leave(*, channel, **kwargs)Leaves a private channel.
groups_list(**kwargs)Lists private channels that the calling user has access to.
groups_mark(*, channel, ts, **kwargs)Sets the read cursor in a private channel.
groups_open(*, channel, **kwargs)Opens a private channel.
groups_rename(*, channel, name, **kwargs)Renames a private channel.
groups_replies(*, channel, thread_ts, **kwargs)Retrieve a thread of messages posted to a private channel
groups_setPurpose(*, channel, purpose, **kwargs)Sets the purpose for a private channel.
groups_setTopic(*, channel, topic, **kwargs)Sets the topic for a private channel.
groups_unarchive(*, channel, **kwargs)Unarchives a private channel.
im_close(*, channel, **kwargs)Close a direct message channel.
im_history(*, channel, **kwargs)Fetches history of messages and events from direct message channel.
im_list(**kwargs)Lists direct message channels for the calling user.
im_mark(*, channel, ts, **kwargs)Sets the read cursor in a direct message channel.
im_open(*, user, **kwargs)Opens a direct message channel.
im_replies(*, channel, thread_ts, **kwargs)Retrieve a thread of messages posted to a direct message conversation
migration_exchange(*, users[, team_id, to_old])For Enterprise Grid workspaces, map local user IDs to global user IDs https://api.slack.com/methods/migration.exchange
mpim_close(*, channel, **kwargs)Closes a multiparty direct message channel.
mpim_history(*, channel, **kwargs)Fetches history of messages and events from a multiparty direct message.
mpim_list(**kwargs)Lists multiparty direct message channels for the calling user.
mpim_mark(*, channel, ts, **kwargs)Sets the read cursor in a multiparty direct message channel.
mpim_open(*, users, **kwargs)This method opens a multiparty direct message.
mpim_replies(*, channel, thread_ts, **kwargs)Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message.
oauth_access(*, client_id, client_secret, code)Exchanges a temporary OAuth verifier code for an access token.
oauth_v2_access(*, client_id, client_secret)Exchanges a temporary OAuth verifier code for an access token.
oauth_v2_exchange(*, token, client_id, ...)Exchanges a legacy access token for a new expiring access token and refresh token https://api.slack.com/methods/oauth.v2.exchange
openid_connect_token(client_id, client_secret)Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack.
openid_connect_userInfo(**kwargs)Get the identity of a user who has authorized Sign in with Slack.
pins_add(*, channel[, timestamp])Pins an item to a channel.
pins_list(*, channel, **kwargs)Lists items pinned to a channel.
pins_remove(*, channel[, timestamp])Un-pins an item from a channel.
reactions_add(*, channel, name, timestamp, ...)Adds a reaction to an item.
reactions_get(*[, channel, file, ...])Gets reactions for an item.
reactions_list(*[, count, cursor, full, ...])Lists reactions made by a user.
reactions_remove(*, name[, channel, file, ...])Removes a reaction from an item.
reminders_add(*, text, time[, team_id, ...])Creates a reminder.
reminders_complete(*, reminder[, team_id])Marks a reminder as complete.
reminders_delete(*, reminder[, team_id])Deletes a reminder.
reminders_info(*, reminder[, team_id])Gets information about a reminder.
reminders_list(*[, team_id])Lists all reminders created by or for a given user.
rtm_connect(*[, batch_presence_aware, ...])Starts a Real Time Messaging session.
rtm_start(*[, batch_presence_aware, ...])Starts a Real Time Messaging session.
search_all(*, query[, count, highlight, ...])Searches for messages and files matching a query.
search_files(*, query[, count, highlight, ...])Searches for files matching a query.
search_messages(*, query[, count, cursor, ...])Searches for messages matching a query.
stars_add(*[, channel, file, file_comment, ...])Adds a star to an item.
stars_list(*[, count, cursor, limit, page, ...])Lists stars for a user.
stars_remove(*[, channel, file, ...])Removes a star from an item.
team_accessLogs(*[, before, count, page, ...])Gets the access logs for the current team.
team_billableInfo(*[, team_id, user])Gets billable users information for the current team.
team_billing_info(**kwargs)Reads a workspace's billing plan information.
team_info(*[, team, domain])Gets information about the current team.
team_integrationLogs(*[, app_id, ...])Gets the integration logs for the current team.
team_preferences_list(**kwargs)Retrieve a list of a workspace's team preferences.
team_profile_get(*[, visibility])Retrieve a team's profile.
usergroups_create(*, name[, channels, ...])Create a User Group https://api.slack.com/methods/usergroups.create
usergroups_disable(*, usergroup[, ...])Disable an existing User Group https://api.slack.com/methods/usergroups.disable
usergroups_enable(*, usergroup[, ...])Enable a User Group https://api.slack.com/methods/usergroups.enable
usergroups_list(*[, include_count, ...])List all User Groups for a team https://api.slack.com/methods/usergroups.list
usergroups_update(*, usergroup[, channels, ...])Update an existing User Group https://api.slack.com/methods/usergroups.update
usergroups_users_list(*, usergroup[, ...])List all users in a User Group https://api.slack.com/methods/usergroups.users.list
usergroups_users_update(*, usergroup, users)Update the list of users for a User Group https://api.slack.com/methods/usergroups.users.update
users_conversations(*[, cursor, ...])List conversations the calling user may access.
users_deletePhoto(**kwargs)Delete the user profile photo https://api.slack.com/methods/users.deletePhoto
users_getPresence(*, user, **kwargs)Gets user presence information.
users_identity(**kwargs)Get a user's identity.
users_info(*, user[, include_locale])Gets information about a user.
users_list(*[, cursor, include_locale, ...])Lists all users in a Slack team.
users_lookupByEmail(*, email, **kwargs)Find a user with an email address.
users_profile_get(*[, user, include_labels])Retrieves a user's profile information.
users_profile_set(*[, name, value, user, ...])Set the profile information for a user.
users_setPhoto(*, image[, crop_w, crop_x, ...])Set the user profile photo https://api.slack.com/methods/users.setPhoto
users_setPresence(*, presence, **kwargs)Manually sets user presence.
validate_slack_signature(*, signing_secret, ...)Slack creates a unique string for your app and shares it with you.
views_open(*, trigger_id, view, **kwargs)Open a view for a user.
views_publish(*, user_id, view[, hash])Publish a static view for a User.
views_push(*, trigger_id, view, **kwargs)Push a view onto the stack of a root view.
views_update(*, view[, external_id, ...])Update an existing view.
workflows_stepCompleted(*, ...[, outputs])Indicate a successful outcome of a workflow step's execution.
workflows_stepFailed(*, ...)Indicate an unsuccessful outcome of a workflow step's execution.
workflows_updateStep(*, workflow_step_edit_id)Update the configuration for a workflow extension step.
Attributes
BASE_URL