@datafire/slack

DataFire integration for Slack Web API

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@datafire/slack
6.0.03 years ago7 years agoMinified + gzip package size for @datafire/slack in KB

Readme

@datafire/slack
Client library for Slack Web API

Installation and Usage

npm install --save @datafire/slack
let slack = require('@datafire/slack').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

One way to interact with the Slack platform is its HTTP RPC-based Web API, a collection of methods requiring OAuth 2.0-based user, bot, or workspace tokens blessed with related OAuth scopes.

Actions

oauthCallback

Exchange the code passed to your redirect URI for an accesstoken
slack.oauthCallback({
  "code": ""
}, context)

Input

  • input object
code required string

Output

  • output object
access
token string refreshtoken string tokentype string scope string expiration string

oauthRefresh

Exchange a refresh
token for an accesstoken
slack.oauthRefresh(null, context)

Input

This action has no parameters

Output

  • output object
accesstoken string refreshtoken string tokentype string scope string expiration string

adminappsapprove

Approve an app for installation on a workspace.
slack.admin_apps_approve({
  "token": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.apps:write app
id string: The id of the app to approve.
request
id string: The id of the request to approve.
team
id string

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defs
oktrue

adminappsapprovedlist

List approved apps for an org or workspace.
slack.admin_apps_approved_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Set cursor to next_cursor returned by the previous call to list items in the next page token required string: Authentication token. Requires scope: admin.apps:read limit integer: The maximum number of items to return. Must be between 1 - 1000 both inclusive. teamid string enterpriseid string

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminappsrequestslist

List app requests for a team/workspace.
slack.admin_apps_requests_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Set cursor to next_cursor returned by the previous call to list items in the next page token required string: Authentication token. Requires scope: admin.apps:read limit integer: The maximum number of items to return. Must be between 1 - 1000 both inclusive. teamid string

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminappsrestrict

Restrict an app for installation on a workspace.
slack.admin_apps_restrict({
  "token": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.apps:write appid string: The id of the app to restrict. requestid string: The id of the request to restrict. teamid string

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminappsrestrictedlist

List restricted apps for an org or workspace.
slack.admin_apps_restricted_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Set cursor to next_cursor returned by the previous call to list items in the next page token required string: Authentication token. Requires scope: admin.apps:read limit integer: The maximum number of items to return. Must be between 1 - 1000 both inclusive. teamid string enterpriseid string

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminconversationssetTeams

Set the workspaces in an Enterprise grid org that connect to a channel.
slack.admin_conversations_setTeams({
  "token": "",
  "channel_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.conversations:write channelid required string: The encoded channel_id to add or remove to workspaces. orgchannel boolean: True if channel has to be converted to an org channel targetteamids string: The list of workspaces to which the channel should be shared. Not required if the channel is being shared orgwide. Example: ['T1234', 'T5678'] teamid string: The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defs
oktrue

adminemojiadd

Add an emoji.
slack.admin_emoji_add({
  "name": "",
  "token": "",
  "url": ""
}, context)

Input

  • input object
name required string: The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included. token required string: Authentication token. Requires scope: admin.teams:write url required string: The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminemojiaddAlias

Add an emoji alias.
slack.admin_emoji_addAlias({
  "alias_for": "",
  "name": "",
  "token": ""
}, context)

Input

  • input object
aliasfor required string: The alias of the emoji. name required string: The name of the emoji to be aliased. Colons (:myemoji:) around the value are not required, although they may be included. token required string: Authentication token. Requires scope: admin.teams:write

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminemojilist

List emoji for an Enterprise Grid organization.
slack.admin_emoji_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Set cursor to next_cursor returned by the previous call to list items in the next page token required string: Authentication token. Requires scope: admin.teams:read limit integer: The maximum number of items to return. Must be between 1 - 1000 both inclusive.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminemojiremove

Remove an emoji across an Enterprise Grid organization
slack.admin_emoji_remove({
  "name": "",
  "token": ""
}, context)

Input

  • input object
name required string: The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included. token required string: Authentication token. Requires scope: admin.teams:write

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminemojirename

Rename an emoji.
slack.admin_emoji_rename({
  "name": "",
  "new_name": "",
  "token": ""
}, context)

Input

  • input object
name required string: The name of the emoji to be renamed. Colons (:myemoji:) around the value are not required, although they may be included. newname required string: The new name of the emoji. token required string: Authentication token. Requires scope: admin.teams:write

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defs
oktrue

admininviteRequestsapprove

Approve a workspace invite request.
slack.admin_inviteRequests_approve({
  "token": "",
  "invite_request_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.invites:write inviterequestid required string: ID of the request to invite. teamid string: ID for the workspace where the invite request was made.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

admininviteRequestsapprovedlist

List all approved workspace invite requests.
slack.admin_inviteRequests_approved_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Value of the next_cursor field sent as part of the previous API response token required string: Authentication token. Requires scope: admin.invites:read limit integer: The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive teamid string: ID for the workspace where the invite requests were made.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

admininviteRequestsdeniedlist

List all denied workspace invite requests.
slack.admin_inviteRequests_denied_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Value of the next_cursor field sent as part of the previous api response token required string: Authentication token. Requires scope: admin.invites:read limit integer: The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive teamid string: ID for the workspace where the invite requests were made.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

admininviteRequestsdeny

Deny a workspace invite request.
slack.admin_inviteRequests_deny({
  "token": "",
  "invite_request_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.invites:write inviterequestid required string: ID of the request to invite. teamid string: ID for the workspace where the invite request was made.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

admininviteRequestslist

List all pending workspace invite requests.
slack.admin_inviteRequests_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Value of the next_cursor field sent as part of the previous API response token required string: Authentication token. Requires scope: admin.invites:read limit integer: The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive teamid string: ID for the workspace where the invite requests were made.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminteamsadminslist

List all of the admins on a given workspace.
slack.admin_teams_admins_list({
  "token": "",
  "team_id": ""
}, context)

Input

  • input object
cursor string: Set cursor to next_cursor returned by the previous call to list items in the next page. token required string: Authentication token. Requires scope: admin.teams:read limit integer: The maximum number of items to return. teamid required string

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminteamscreate

Create an Enterprise team.
slack.admin_teams_create({
  "token": "",
  "team_domain": "",
  "team_name": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.teams:write teamdescription string: Description for the team. teamdiscoverability string: Who can join the team. A team's discoverability can be open, closed, invite_only, or unlisted. teamdomain required string: Team domain (for example, slacksoftballteam). teamname required string: Team name (for example, Slack Softball Team).

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminteamslist

List all teams on an Enterprise organization
slack.admin_teams_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Set cursor to next_cursor returned by the previous call to list items in the next page. token required string: Authentication token. Requires scope: admin.teams:read limit integer: The maximum number of items to return. Must be between 1 - 100 both inclusive.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminteamsownerslist

List all of the owners on a given workspace.
slack.admin_teams_owners_list({
  "token": "",
  "team_id": ""
}, context)

Input

  • input object
cursor string: Set cursor to next_cursor returned by the previous call to list items in the next page. token required string: Authentication token. Requires scope: admin.teams:read limit integer: The maximum number of items to return. Must be between 1 - 1000 both inclusive. teamid required string

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminteamssettingsinfo

Fetch information about settings in a workspace
slack.admin_teams_settings_info({
  "token": "",
  "team_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.teams:read teamid required string

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminteamssettingssetDefaultChannels

Set the default channels of a workspace.
slack.admin_teams_settings_setDefaultChannels({
  "channel_ids": "",
  "team_id": "",
  "token": ""
}, context)

Input

  • input object
channelids required string: An array of channel IDs. teamid required string: ID for the workspace to set the default channel for. token required string: Authentication token. Requires scope: admin.teams:write

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defs
oktrue

adminteamssettingssetDescription

Set the description of a given workspace.
slack.admin_teams_settings_setDescription({
  "token": "",
  "description": "",
  "team_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.teams:write description required string: The new description for the workspace. teamid required string: ID for the workspace to set the description for.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminteamssettingssetDiscoverability

An API method that allows admins to set the discoverability of a given workspace
slack.admin_teams_settings_setDiscoverability({
  "token": "",
  "discoverability": "",
  "team_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.teams:write discoverability required string: This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted. teamid required string: The ID of the workspace to set discoverability on.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminteamssettingssetIcon

Sets the icon of a workspace.
slack.admin_teams_settings_setIcon({
  "image_url": "",
  "team_id": "",
  "token": ""
}, context)

Input

  • input object
imageurl required string: Image URL for the icon teamid required string: ID for the workspace to set the icon for. token required string: Authentication token. Requires scope: admin.teams:write

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defs
oktrue

adminteamssettingssetName

Set the name of a given workspace.
slack.admin_teams_settings_setName({
  "token": "",
  "name": "",
  "team_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.teams:write name required string: The new name of the workspace. teamid required string: ID for the workspace to set the name for.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminusersassign

Add an Enterprise user to a workspace.
slack.admin_users_assign({
  "token": "",
  "team_id": "",
  "user_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.users:write channelids string: Comma separated values of channel IDs to add user in the new workspace. isrestricted boolean: True if user should be added to the workspace as a guest. isultrarestricted boolean: True if user should be added to the workspace as a single-channel guest. teamid required string: The ID (T1234) of the workspace. userid required string: The ID of the user to add to the workspace.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminusersinvite

Invite a user to a workspace.
slack.admin_users_invite({
  "token": "",
  "channel_ids": "",
  "email": "",
  "team_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.users:write channelids required string: A comma-separated list of channel_ids for this user to join. At least one channel is required. custommessage string: An optional message to send to the user in the invite email. email required string: The email address of the person to invite. guestexpirationts string: Timestamp when guest account should be disabled. Only include this timestamp if you are inviting a guest user and you want their account to expire on a certain date. isrestricted boolean: Is this user a multi-channel guest user? (default: false) isultrarestricted boolean: Is this user a single channel guest user? (default: false) realname string: Full name of the user. resend boolean: Allow this invite to be resent in the future if a user has not signed up yet. (default: false) teamid required string: The ID (T1234) of the workspace.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminuserslist

List users on a workspace
slack.admin_users_list({
  "token": "",
  "team_id": ""
}, context)

Input

  • input object
cursor string: Set cursor to next_cursor returned by the previous call to list items in the next page. token required string: Authentication token. Requires scope: admin.users:read limit integer: Limit for how many users to be retrieved per page teamid required string: The ID (T1234) of the workspace.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminusersremove

Remove a user from a workspace.
slack.admin_users_remove({
  "token": "",
  "team_id": "",
  "user_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.users:write teamid required string: The ID (T1234) of the workspace. userid required string: The ID of the user to remove.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminuserssessionreset

Wipes all valid sessions on all devices for a given user
slack.admin_users_session_reset({
  "token": "",
  "user_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.users:write mobileonly boolean: Only expire mobile sessions (default: false) userid required string: The ID of the user to wipe sessions for webonly boolean: Only expire web sessions (default: false)

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminuserssetAdmin

Set an existing guest, regular user, or owner to be an admin user.
slack.admin_users_setAdmin({
  "token": "",
  "team_id": "",
  "user_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.users:write teamid required string: The ID (T1234) of the workspace. userid required string: The ID of the user to designate as an admin.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminuserssetExpiration

Set an expiration for a guest user
slack.admin_users_setExpiration({
  "token": "",
  "expiration_ts": 0,
  "team_id": "",
  "user_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.users:write expirationts required integer: Timestamp when guest account should be disabled. teamid required string: The ID (T1234) of the workspace. userid required string: The ID of the user to set an expiration for.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminuserssetOwner

Set an existing guest, regular user, or admin user to be a workspace owner.
slack.admin_users_setOwner({
  "token": "",
  "team_id": "",
  "user_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.users:write teamid required string: The ID (T1234) of the workspace. userid required string: Id of the user to promote to owner.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

adminuserssetRegular

Set an existing guest user, admin user, or owner to be a regular user.
slack.admin_users_setRegular({
  "token": "",
  "team_id": "",
  "user_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: admin.users:write teamid required string: The ID (T1234) of the workspace. userid required string: The ID of the user to designate as a regular user.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

apitest

Checks API calling code.
slack.api_test({}, context)

Input

  • input object
foo string: example property to return error string: Error response to return

Output

  • output object: Schema for successful response api.test method
ok required defsoktrue

appspermissionsinfo

Returns list of permissions this app has on a team.
slack.apps_permissions_info({}, context)

Input

  • input object
token string: Authentication token. Requires scope: none

Output

  • output object: Schema for successful response from apps.permissions.info method
info required object
* app_home **required** `object`
  * resources [objs_resources](#objs_resources)
  * scopes [objs_scopes](#objs_scopes)
* channel **required** `object`
  * resources [objs_resources](#objs_resources)
  * scopes [objs_scopes](#objs_scopes)
* group **required** `object`
  * resources [objs_resources](#objs_resources)
  * scopes [objs_scopes](#objs_scopes)
* im **required** `object`
  * resources [objs_resources](#objs_resources)
  * scopes [objs_scopes](#objs_scopes)
* mpim **required** `object`
  * resources [objs_resources](#objs_resources)
  * scopes [objs_scopes](#objs_scopes)
* team **required** `object`
  * resources **required** [objs_resources](#objs_resources)
  * scopes **required** [objs_scopes](#objs_scopes)
ok required defsoktrue

appspermissionsrequest

Allows an app to request additional scopes
slack.apps_permissions_request({
  "scopes": "",
  "token": "",
  "trigger_id": ""
}, context)

Input

  • input object
scopes required string: A comma separated list of scopes to request for token required string: Authentication token. Requires scope: none triggerid required string: Token used to trigger the permissions API

Output

  • output object: Schema for successful response from apps.permissions.request method
ok required defsoktrue

appspermissionsresourceslist

Returns list of resource grants this app has on a team.
slack.apps_permissions_resources_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. token required string: Authentication token. Requires scope: none limit integer: The maximum number of items to return.

Output

  • output object: Schema for successful response apps.permissions.resources.list method
ok required defsoktrue resources required array
* items `object`
  * id `string`
  * type `string`
responsemetadata object
* next_cursor **required** `string`

appspermissionsscopeslist

Returns list of scopes this app has on a team.
slack.apps_permissions_scopes_list({
  "token": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: none

Output

  • output object: Schema for successful response api.permissions.scopes.list method
ok required defs
oktrue scopes required object
* app_home [objs_scopes](#objs_scopes)
* channel [objs_scopes](#objs_scopes)
* group [objs_scopes](#objs_scopes)
* im [objs_scopes](#objs_scopes)
* mpim [objs_scopes](#objs_scopes)
* team [objs_scopes](#objs_scopes)
* user [objs_scopes](#objs_scopes)

appspermissionsuserslist

Returns list of user grants and corresponding scopes this app has on a team.
slack.apps_permissions_users_list({
  "token": ""
}, context)

Input

  • input object
cursor string: Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. token required string: Authentication token. Requires scope: none limit integer: The maximum number of items to return.

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

appspermissionsusersrequest

Enables an app to trigger a permissions modal to grant an app access to a user access scope.
slack.apps_permissions_users_request({
  "scopes": "",
  "token": "",
  "user": "",
  "trigger_id": ""
}, context)

Input

  • input object
scopes required string: A comma separated list of user scopes to request for token required string: Authentication token. Requires scope: none user required string: The user this scope is being requested for triggerid required string: Token used to trigger the request

Output

  • output object: This method either only returns a brief OK response or a verbose schema is not available for this method.
ok required defsoktrue

appsuninstall

Uninstalls your app from a workspace.
slack.apps_uninstall({}, context)

Input

  • input object
clientsecret string: Issued when you created your application. token string: Authentication token. Requires scope: none clientid string: Issued when you created your application.

Output

  • output object: Schema for successful response from apps.uninstall method
ok required defsoktrue

authrevoke

Revokes a token.
slack.auth_revoke({
  "token": ""
}, context)

Input

  • input object
test boolean: Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked. token required string: Authentication token. Requires scope: none

Output

  • output object: Schema for successful response from auth.revoke method
ok required defsoktrue revoked required boolean

authtest

Checks authentication & identity.
slack.auth_test({
  "token": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: none

Output

  • output object: Schema for successful response auth.test method
isenterpriseinstall boolean ok required defsoktrue team required string teamid required defsteam url required string user required string userid required defsuserid

botsinfo

Gets information about a bot user.
slack.bots_info({
  "token": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: users:read bot string: Bot user to get info on

Output

  • output object: Schema for successful response from bots.info method
bot required object
* app_id **required** [defs_app_id](#defs_app_id)
* deleted **required** `boolean`
* icons **required** `object`
  * image_36 **required** `string`
  * image_48 **required** `string`
  * image_72 **required** `string`
* id **required** [defs_bot_id](#defs_bot_id)
* name **required** `string`
* updated **required** `integer`
* user_id [defs_user_id](#defs_user_id)
ok required defsoktrue

channelsarchive

Archives a channel.
slack.channels_archive({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:write channel string: Channel to archive

Output

  • output object: Schema for successful response from channels.archive method
ok required defsoktrue

channelscreate

Creates a channel.
slack.channels_create({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:write name string: Name of channel to create validate boolean: Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.

Output

  • output object: Schema for successful response channels.create method
channel required objschannel ok required defsoktrue

channelshistory

Fetches history of messages and events from a channel.
slack.channels_history({}, context)

Input

  • input object
count integer: Number of messages to return, between 1 and 1000. unreads boolean: Include unread_count_display in the output? inclusive boolean: Include messages with latest or oldest timestamp in results. token string: Authentication token. Requires scope: channels:history oldest number: Start of time range of messages to include in results. channel string: Channel to fetch history for. latest number: End of time range of messages to include in results.

Output

  • output object: Schema for successful response channels.history method
channelactionscount required integer channelactionsts required hasmore required boolean islimited boolean messages required array
* items [objs_message](#objs_message)
ok required defs
oktrue

channelsinfo

Gets information about a channel.
slack.channels_info({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:read includelocale boolean: Set this to true to receive the locale for this channel. Defaults to false channel string: Channel to get info on

Output

  • output object: Schema for successful response channels.info method
channel required objs
channel ok required defsoktrue

channelsinvite

Invites a user to a channel.
slack.channels_invite({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:write channel string: Channel to invite user to. user string: User to invite to channel.

Output

  • output object: Schema for successful response channels.invite method
channel required objschannel ok required defsoktrue

channelsjoin

Joins a channel, creating it if needed.
slack.channels_join({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:write name string: Name of channel to join validate boolean: Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.

Output

  • output object: Schema for successful response from channels.join method
alreadyinchannel boolean channel required objschannel ok required defsoktrue

channelskick

Removes a user from a channel.
slack.channels_kick({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:write channel string: Channel to remove user from. user string: User to remove from channel.

Output

  • output object: Schema for successful response from channels.kick method
ok required defsoktrue

channelsleave

Leaves a channel.
slack.channels_leave({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:write channel string: Channel to leave

Output

  • output object: Schema for successful response from channels.leave method
ok required defsoktrue

channelslist

Lists all channels in a Slack team.
slack.channels_list({}, context)

Input

  • input object
excludemembers boolean: Exclude the members collection from each channel cursor string: Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. token string: Authentication token. Requires scope: channels:read limit integer: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. excludearchived boolean: Exclude archived channels from the list

Output

  • output object: Schema for successful response channels.list method
channels required array
* items [objs_channel](#objs_channel)
ok required defs
oktrue
responsemetadata objsresponsemetadata

channelsmark

Sets the read cursor in a channel.
slack.channels_mark({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:write channel string: Channel to set reading cursor in. ts number: Timestamp of the most recently seen message.

Output

  • output object: Schema for successful response channels.mark method
ok required defsoktrue

channelsrename

Renames a channel.
slack.channels_rename({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:write channel string: Channel to rename name string: New name for channel. validate boolean: Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.

Output

  • output object: Schema for successful response from channels.rename method
channel required objschannel ok required defsoktrue

channelsreplies

Retrieve a thread of messages posted to a channel
slack.channels_replies({}, context)

Input

  • input object
threadts number: Unique identifier of a thread's parent message token string: Authentication token. Requires scope: channels:history channel string: Channel to fetch thread from

Output

  • output object: Schema for successful response from channels.replies method
hasmore required boolean messages required array
* items
ok required defs
oktrue

channelssetPurpose

Sets the purpose for a channel.
slack.channels_setPurpose({
  "token": "",
  "channel": "",
  "purpose": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: channels:write channel required string: Channel to set the purpose of nametagging boolean: if it is true, treat this like a message and not an unescaped thing purpose required string: The new purpose

Output

  • output object: Schema for successful response from channels.setPurpose method
ok required defs
oktrue
purpose required string

channelssetTopic

Sets the topic for a channel.
slack.channels_setTopic({
  "token": "",
  "channel": "",
  "topic": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: channels:write channel required string: Channel to set the topic of topic required string: The new topic

Output

  • output object: Schema for successful response from channels.setTopic method
ok required defsoktrue topic required string

channelsunarchive

Unarchives a channel.
slack.channels_unarchive({
  "token": "",
  "channel": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: channels:write channel required string: Channel to unarchive

Output

  • output object: Schema for successful response from channels.unarchive method
ok required defsoktrue

chatdelete

Deletes a message.
slack.chat_delete({}, context)

Input

  • input object
token string: Authentication token. Requires scope: chat:write asuser boolean: Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope. channel string: Channel containing the message to be deleted. ts number: Timestamp of the message to be deleted.

Output

  • output object: Schema for successful response of chat.delete method
channel required defschannel ok required defsoktrue ts required defsts

chatdeleteScheduledMessage

Deletes a pending scheduled message from the queue.
slack.chat_deleteScheduledMessage({
  "token": "",
  "channel": "",
  "scheduled_message_id": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: chat:write asuser boolean: Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope. channel required string: The channel the scheduledmessage is posting to scheduledmessageid required string: scheduled_message_id returned from call to chat.scheduleMessage

Output

  • output object: Schema for successful response from chat.deleteScheduledMessage method
ok required defs
oktrue

chatgetPermalink

Retrieve a permalink URL for a specific extant message
slack.chat_getPermalink({
  "token": "",
  "message_ts": "",
  "channel": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: none messagets required string: A message's ts value, uniquely identifying it within a channel channel required string: The ID of the conversation or channel containing the message

Output

  • output object: Schema for successful response chat.getPermalink
channel required defs
channel ok required defsoktrue permalink required string

chatmeMessage

Share a me message into a channel.
slack.chat_meMessage({}, context)

Input

  • input object
token string: Authentication token. Requires scope: chat:write:user channel string: Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. text string: Text of the message to send.

Output

  • output object: Schema for successful response from chat.meMessage method
channel defschannel ok required defsoktrue ts defsts

chatpostEphemeral

Sends an ephemeral message to a user in a channel.
slack.chat_postEphemeral({
  "token": "",
  "channel": "",
  "user": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: chat:write asuser boolean: Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false. attachments string: A JSON-based array of structured attachments, presented as a URL-encoded string. blocks string: A JSON-based array of structured blocks, presented as a URL-encoded string. channel required string: Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. iconemoji string: Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. iconurl string: URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. linknames boolean: Find and link channel names and usernames. parse string: Change how messages are treated. Defaults to none. See below. text string: How this field works and whether it is required depends on other fields you use in your API call. See below for more detail. threadts string: Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread. user required string: id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument. username string: Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.

Output

  • output object: Schema for successful response from chat.postEphemeral method
messagets required defsts ok required defsoktrue

chatpostMessage

Sends a message to a channel.
slack.chat_postMessage({
  "token": "",
  "channel": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: chat:write asuser string: Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. attachments string: A JSON-based array of structured attachments, presented as a URL-encoded string. blocks string: A JSON-based array of structured blocks, presented as a URL-encoded string. channel required string: Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details. iconemoji string: Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. iconurl string: URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. linknames boolean: Find and link channel names and usernames. mrkdwn boolean: Disable Slack markup parsing by setting to false. Enabled by default. parse string: Change how messages are treated. Defaults to none. See below. replybroadcast boolean: Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false. text string: How this field works and whether it is required depends on other fields you use in your API call. See below for more detail. threadts string: Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead. unfurllinks boolean: Pass true to enable unfurling of primarily text-based content. unfurlmedia boolean: Pass false to disable unfurling of media content. username string: Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.

Output

  • output object: Schema for successful response of chat.postMessage method
channel required defschannel message required objsmessage ok required defsoktrue ts required defsts

chatscheduleMessage

Schedules a message to be sent to a channel.
slack.chat_scheduleMessage({}, context)

Input

  • input object
token string: Authentication token. Requires scope: chat:write asuser boolean: Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See chat.postMessage. attachments string: A JSON-based array of structured attachments, presented as a URL-encoded string. blocks string: A JSON-based array of structured blocks, presented as a URL-encoded string. channel string: Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details. linknames boolean: Find and link channel names and usernames. parse string: Change how messages are treated. Defaults to none. See chat.postMessage. postat string: Unix EPOCH timestamp of time in future to send the message. replybroadcast boolean: Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false. text string: How this field works and whether it is required depends on other fields you use in your API call. See below for more detail. threadts number: Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead. unfurllinks boolean: Pass true to enable unfurling of primarily text-based content. unfurlmedia boolean: Pass false to disable unfurling of media content.

Output

  • output object: Schema for successful response of chat.scheduleMessage method
channel required defschannel
message required object
* bot_id **required** [defs_bot_id](#defs_bot_id)
* bot_profile [objs_bot_profile](#objs_bot_profile)
* team **required** [defs_team](#defs_team)
* text **required** `string`
* type **required** `string`
* user **required** [defs_user_id](#defs_user_id)
* username `string`
ok required defsoktrue postat required integer scheduledmessageid required string

chatscheduledMessageslist

Returns a list of scheduled messages.
slack.chat_scheduledMessages_list({}, context)

Input

  • input object
cursor string: For pagination purposes, this is the cursor value returned from a previous call to chat.scheduledmessages.list indicating where you want to start this call from. token string: Authentication token. Requires scope: none limit integer: Maximum number of original entries to return. oldest number: A UNIX timestamp of the oldest value in the time range channel string: The channel of the scheduled messages latest number: A UNIX timestamp of the latest value in the time range

Output

  • output object: Schema for successful response from chat.scheduledMessages.list method
ok required defs
oktrue
responsemetadata required object
* next_cursor **required** `string`
scheduledmessages required array
* items `object`
  * channel_id **required** [defs_channel_id](#defs_channel_id)
  * date_created **required** `integer`
  * id **required** `string`
  * post_at **required** `integer`
  * text `string`

chatunfurl

Provide custom unfurl behavior for user-posted URLs
slack.chat_unfurl({
  "token": "",
  "channel": "",
  "ts": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: links:write channel required string: Channel ID of the message ts required string: Timestamp of the message to add unfurl behavior to. unfurls string: URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. userauthmessage string: Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior user
authrequired boolean: Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain userauthurl string: Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.

Output

  • output object: Schema for successful response from chat.unfurl method
ok required defs
oktrue

chatupdate

Updates a message.
slack.chat_update({
  "token": "",
  "channel": "",
  "ts": ""
}, context)

Input

  • input object
token required string: Authentication token. Requires scope: chat:write asuser string: Pass true to update the message as the authed user. Bot users in this context are considered authed users. attachments string: A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting text. blocks string: A JSON-based array of structured blocks, presented as a URL-encoded string. channel required string: Channel containing the message to be updated. linknames string: Find and link channel names and usernames. Defaults to none. See below. parse string: Change how messages are treated. Defaults to client, unlike chat.postMessage. Accepts either none or full. See below. text string: New text for the message, using the default formatting rules. It's not required when presenting attachments. ts required string: Timestamp of the message to be updated.

Output

  • output object: Schema for successful response of chat.update method
channel required string message required object
* attachments `array`
  * items `object`
* blocks [blocks](#blocks)
* text **required** `string`
ok required defsoktrue text required string ts required string

conversationsarchive

Archives a conversation.
slack.conversations_archive({}, context)

Input

  • input object
token string: Authentication token. Requires scope: conversations:write channel string: ID of conversation to archive

Output

  • output object: Schema for successful response conversations.archive method
ok required defsoktrue

conversationsclose

Closes a direct message or multi-person direct message.
slack.conversations_close({}, context)

Input

  • input object
token string: Authentication token. Requires scope: conversations:write channel string: Conversation to close.

Output

  • output object: Schema for successful response conversations.close method
alreadyclosed boolean noop boolean ok required defsoktrue

conversationscreate

Initiates a public or private channel-based conversation
slack.conversations_create({}, context)

Input

  • input object
token string: Authentication token. Requires scope: conversations:write isprivate boolean: Create a private channel instead of a public one name string: Name of the public or private channel to create userids string: Required for workspace apps. A list of between 1 and 30 human users that will be added to the newly-created conversation. This argument has no effect when used by classic Slack apps.

Output

  • output object: Schema for successful response conversations.create method
channel required objsconversation ok required defsoktrue

conversationshistory

Fetches a conversation's history of messages and events.
slack.conversations_history({}, context)

Input

  • input object
inclusive boolean: Include messages with latest or oldest timestamp in results only when either timestamp is specified. cursor string: Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. token string: Authentication token. Requires scope: conversations:history limit integer: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. oldest number: Start of time range of messages to include in results. channel string: Conversation ID to fetch history for. latest number: End of time range of messages to include in results.

Output

  • output object: Schema for successful response from conversations.history method
channelactionscount required integer channelactionsts required hasmore required boolean messages required array
* items [objs_message](#objs_message)
ok required defs
oktrue pincount required integer

conversationsinfo

Retrieve information about a conversation.
slack.conversations_info({}, context)

Input

  • input object
includenummembers boolean: Set to true to include the member count for the specified conversation. Defaults to false token string: Authentication token. Requires scope: conversations:read channel string: Conversation ID to learn more about include
locale boolean: Set this to true to receive the locale for this conversation. Defaults to false

Output

  • output object: Schema for successful response conversations.info
channel required objsconversation ok required defsoktrue

conversationsinvite

Invites users to a channel.
slack.conversations_invite({}, context)

Input

  • input object
token string: Authentication token. Requires scope: conversations:write channel string: The ID of the public or private channel to invite user(s) to. users string: A comma separated list of user IDs. Up to 1000 users may be listed.

Output

  • output object: Schema for successful response from conversations.invite method
channel required objsconversation ok required defsoktrue

conversationsjoin

Joins an existing conversation.
slack.conversations_join({}, context)

Input

  • input object
token string: Authentication token. Requires scope: channels:write channel string: ID of conversation to join

Output

  • output object: Schema for successful response from conversations.join method
channel required objsconversation ok required defsoktrue responsemetadata object
* warnings `array`
  * items `string`
warning string

conversationskick

Removes a user from a conversation.
slack.conversations_kick({}, context)

Input

  • input object
token string: Authentication token. Requires scope: conversations:write channel string: ID of conversation to remove user from. user string: User ID to be removed.

Output

  • output object: Schema for successful response conversations.kick method
ok required defsoktrue

conversationsleave

Leaves a conversation.
slack.conversations_leave({}, context)

Input

  • input object
token string: Authentication token. Requires scope: conversations:write channel string: Conversation to leave

Output

  • output object: Schema for successful response from conversations.leave method
notinchannel boolean (values: true) ok required defsoktrue

conversationslist

Lists all channels in a Slack team.
slack.conversations_list({}, context)

Input

  • input object
cursor string: Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. token string: Authentication token. Requires scope: conversations:read limit integer: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000. excludearchived boolean: Set to true to exclude archived channels from the list types string: Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im

Output

  • output object: Schema for successful response from conversations.list method
channels required array
* items [objs_conversation](#objs_conversation)
ok required defsoktrue
responsemetadata object
* next_cursor **required** `string`

conversationsmembers

Retrieve members of a conversation.
slack.conversations_members({}, context)

Input

  • input object
cursor string: Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination
for more detail. token string: Authentication token. Requires scope: conversations:read limit integer: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. channel string: ID of the conversation to retrieve members for

Output

  • output object: Schema for successful response conversations.members method
members required array
* items [defs_user_id](#defs_user_id)
ok required defsoktrue responsemetadata required object
* next_cursor **required** `string`

conversationsopen

Opens or resumes a direct message or multi-person direct message.
slack.conversations_open({}, context)

Input

  • input object
token string: Authentication token. Requires scope: conversations:write channel string: Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead. returnim boolean: Boolean, indic