Slack Web API
This is not official version of Slack API Documentation.
Link to Official documentation
Authentication
Sends a message to a channel.
Request headers
Authentication token. Requires scope: chat:write
Request body
Set your bot’s user name. Must be used in conjunction with as_user
set to false, otherwise ignored. See authorship below.
Provide another message’s ts
value to make this message a reply. Avoid using a reply’s ts
value; use its parent instead.
A JSON-based array of structured attachments, presented as a URL-encoded string.
Pass true to enable unfurling of primarily text-based content.
Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you’re providing only attachments
instead.
Pass false to disable unfurling of media content.
Change how messages are treated. Defaults to none
. See below.
Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below.
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.
Find and link channel names and usernames.
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.
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.
Used in conjunction with thread_ts
and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false
.
Responses
Typical error response if too many attachments are included
Body
Examples
{
"ok" : false,
"error" : "too_many_attachments"
}
Typical success response
Body
Examples
{
"message" : {
"username" : "ecto1",
"attachments" : [
{
"text" : "This is an attachment",
"fallback" : "This is an attachment's fallback",
"id" : 1
}
],
"text" : "Here's a message for you",
"ts" : "1503435956.000247",
"subtype" : "bot_message",
"type" : "message",
"bot_id" : "B19LU7CSY"
},
"ok" : true,
"ts" : "1503435956.000247",
"channel" : "C1H9RESGL"
}
Authentication
Share a me message into a channel.
Request headers
Authentication token. Requires scope: chat:write:user
Request body
Text of the message to send.
Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Body
Examples
{
"ok" : true,
"ts" : "1417671948.000006",
"channel" : "C024BE7LR"
}
Authentication
Retrieve a permalink URL for a specific extant message
Request parameters
Authentication token. Requires scope: tokens.basic
A message’s ts
value, uniquely identifying it within a channel
The ID of the conversation or channel containing the message
Responses
Error response when channel cannot be found
Body
Examples
Standard success response
Body
Examples
{
"permalink" : "https://ghostbusters.slack.com/archives/C1H9RESGA/p135854651500008",
"ok" : true,
"channel" : "C1H9RESGA"
}
Authentication
Deletes a message.
Request headers
Authentication token. Requires scope: chat:write
Request body
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.
Timestamp of the message to be deleted.
Channel containing the message to be deleted.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "message_not_found"
}
Typical success response
Body
Examples
{
"ok" : true,
"ts" : "1401383885.000061",
"channel" : "C024BE91L"
}
Authentication
Provide custom unfurl behavior for user-posted URLs
Request headers
Authentication token. Requires scope: links:write
Request body
Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior
Set to true
or 1
to indicate the user must install your Slack app to trigger unfurls for this domain
URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl message attachments.
Timestamp of the message to add unfurl behavior to.
Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.
Channel ID of the message
Responses
Typical error response
Body
Examples
Typical, minimal success response
Authentication
Sends an ephemeral message to a user in a channel.
Request headers
Authentication token. Requires scope: chat:write
Request body
A JSON-based array of structured attachments, presented as a URL-encoded string.
Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you’re providing only attachments
instead.
Find and link channel names and usernames.
Change how messages are treated. Defaults to none
. See below.
id
of the user who will receive the ephemeral message. The user should be in the channel specified by the channel
argument.
Pass true to post the message as the authed bot. Defaults to false.
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.
Responses
Typical error response
Body
Examples
Typical success response
Body
Examples
{
"ok" : true,
"message_ts" : "1502210682.580145"
}
Authentication
Updates a message.
Request headers
Authentication token. Requires scope: chat:write
Request body
A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting text
.
New text for the message, using the default formatting rules. It’s not required when presenting attachments
.
Timestamp of the message to be updated.
Change how messages are treated. Defaults to client
, unlike chat.postMessage
. See below.
Pass true to update the message as the authed user. Bot users in this context are considered authed users.
Find and link channel names and usernames. Defaults to none
. This parameter should be used in conjunction with parse
. To set link_names
to 1
, specify a parse
mode of full
.
Channel containing the message to be updated.
Responses
Typical error response
Body
Examples
Typical success response
Body
Examples
{
"text" : "Updated text you carefully authored",
"ok" : true,
"ts" : "1401383885.000061",
"channel" : "C024BE91L"
}
Authentication
Edit an existing file comment.
Request headers
Authentication token. Requires scope: files:write:user
Request body
Text of the comment to edit.
The comment to edit.
File containing the comment to edit.
Responses
Standard failure response when used with an invalid token
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Standard success response when used with a user token
Body
Examples
{
"user_id" : "W12345678",
"url" : "https://subarachnoid.slack.com/",
"team_id" : "T12345678",
"user" : "grace",
"team" : "Subarachnoid Workspace",
"ok" : true
}
Authentication
Deletes an existing comment on a file.
Request headers
Authentication token. Requires scope: files:write:user
Request body
The comment to delete.
File to delete a comment from.
Responses
Standard failure response when used with an invalid token
Body
Examples
{
"ok" : false,
"error" : "file_not_found"
}
Standard success response is very simple
Authentication
Add a comment to an existing file.
Request headers
Authentication token. Requires scope: files:write:user
Request body
Text of the comment to add.
File to add a comment to.
Responses
Artificial error response
Body
Examples
{
"ok" : false,
"error" : "file_not_found"
}
Standard success response
Body
Examples
{
"comment" : {
"comment" : "Everyone should take a moment to read this file.",
"created" : 1356032811,
"timestamp" : 1356032811,
"user" : "U1234567890",
"id" : "Fc1234567890",
"channel" : "C1234467890"
},
"ok" : true
}
Authentication
Close a direct message channel.
Request headers
Authentication token. Requires scope: im:write
Request body
Direct message channel to close.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Opens a direct message channel.
Request headers
Authentication token. Requires scope: im:write
Request body
Boolean, indicates you want the full IM channel definition in the response.
User to open a direct message channel with.
Set this to true
to receive the locale for this im. Defaults to false
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Body
Examples
{
"ok" : true
}
Authentication
Sets the read cursor in a direct message channel.
Request headers
Authentication token. Requires scope: im:write
Request body
Timestamp of the most recently seen message.
Direct message channel to set reading cursor in.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Fetches history of messages and events from direct message channel.
Request parameters
Number of messages to return, between 1 and 1000.
Include unread_count_display
in the output?
Include messages with latest or oldest timestamp in results.
Authentication token. Requires scope: im:history
Start of time range of messages to include in results.
Direct message channel to fetch history for.
End of time range of messages to include in results.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "channel_not_found"
}
Typical success response
Body
Examples
{
"has_more" : false,
"messages" : [
{
"text" : "Hello",
"type" : "message",
"ts" : "1358546515.000008",
"user" : "U2147483896"
},
{
"text" : "World",
"is_starred" : true,
"type" : "message",
"ts" : "1358546515.000007",
"user" : "U2147483896"
},
{
"type" : "something_else",
"ts" : "1358546515.000007"
}
],
"ok" : true,
"latest" : "1358547726.000003"
}
Authentication
Retrieve a thread of messages posted to a direct message conversation
Request parameters
Unique identifier of a thread’s parent message
Authentication token. Requires scope: im:history
Direct message channel to fetch thread from
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "channel_not_found"
}
Typical success response
Body
Examples
{
"messages" : [
{
"text" : "Hello",
"type" : "message",
"ts" : "1358546515.000008",
"user" : "U2147483896"
},
{
"text" : "World",
"is_starred" : true,
"type" : "message",
"ts" : "1358546515.000007",
"user" : "U2147483896"
},
{
"type" : "something_else",
"ts" : "1358546515.000007"
}
],
"ok" : true
}
Authentication
Lists direct message channels for the calling user.
Request parameters
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.
Authentication token. Requires scope: im:read
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.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Body
Examples
{
"ims" : [
{
"created" : 1449709280,
"is_user_deleted" : false,
"is_org_shared" : false,
"user" : "USLACKBOT",
"is_im" : true,
"id" : "D0G9QPY56"
},
{
"created" : 1466692204,
"is_user_deleted" : false,
"is_org_shared" : false,
"user" : "U0G9QF9C6",
"is_im" : true,
"id" : "D1KL59A72"
},
{
"created" : 1449722883,
"is_user_deleted" : false,
"is_org_shared" : false,
"user" : "U0G9WFXNZ",
"is_im" : true,
"id" : "D0G9XPFH9"
},
{
"created" : 1452098023,
"is_user_deleted" : false,
"is_org_shared" : false,
"user" : "W0HRJL7CK",
"is_im" : true,
"id" : "D0HRHJSF7"
},
{
"created" : 1465834222,
"is_user_deleted" : true,
"is_org_shared" : false,
"user" : "U1GDBDGR3",
"is_im" : true,
"id" : "D1GD7CHC0"
},
{
"created" : 1468274703,
"is_user_deleted" : false,
"is_org_shared" : false,
"user" : "U1QNSQB9U",
"is_im" : true,
"id" : "D1QMF76M9"
},
{
"created" : 1502210225,
"is_user_deleted" : false,
"is_org_shared" : false,
"user" : "U6KR7BVFW",
"is_im" : true,
"id" : "D6K48KKRN"
}
],
"ok" : true,
"response_metadata" : {
"next_cursor" : "aW1faWQ6RDBCSDk1RExI="
}
}
Authentication
Retrieve a thread of messages posted to a private channel
Request parameters
Unique identifier of a thread’s parent message
Authentication token. Requires scope: groups:history
Private channel to fetch thread from
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "channel_not_found"
}
Typical success response
Body
Examples
{
"messages" : [
{
"text" : "Hello",
"type" : "message",
"ts" : "1358546515.000008",
"user" : "U2147483896"
},
{
"text" : "World",
"is_starred" : true,
"type" : "message",
"ts" : "1358546515.000007",
"user" : "U2147483896"
},
{
"type" : "something_else",
"ts" : "1358546515.000007"
}
],
"ok" : true
}
Authentication
Renames a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.
New name for private channel.
Private channel to rename
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Lists private channels that the calling user has access to.
Request parameters
Exclude the members
from each group
Authentication token. Requires scope: groups:read
Don’t return archived private channels.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Body
Examples
{
"ok" : true
}
Authentication
Removes a user from a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
User to remove from private channel.
Private channel to remove user from.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Sets the read cursor in a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
Timestamp of the most recently seen message.
Private channel to set reading cursor in.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Gets information about a private channel.
Request parameters
Authentication token. Requires scope: groups:read
Set this to true
to receive the locale for this group. Defaults to false
Private channel to get info on
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Body
Examples
{
"ok" : true
}
Authentication
Leaves a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
Private channel to leave
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Clones and archives a private channel.
Request body
Authentication token. Requires scope: groups:write
Private channel to clone and archive.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Invites a user to a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
User to invite.
Private channel to invite user to.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Body
Examples
{
"ok" : true
}
Authentication
Creates a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.
Name of private channel to create
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Body
Examples
{
"ok" : true
}
Authentication
Opens a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
Private channel to open.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Fetches history of messages and events from a private channel.
Request parameters
Number of messages to return, between 1 and 1000.
Include unread_count_display
in the output?
Include messages with latest or oldest timestamp in results.
Authentication token. Requires scope: groups:history
Start of time range of messages to include in results.
Private channel to fetch history for.
End of time range of messages to include in results.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "channel_not_found"
}
Typical success response
Body
Examples
{
"has_more" : false,
"messages" : [
{
"text" : "Hello",
"type" : "message",
"ts" : "1358546515.000008",
"user" : "U2147483896"
},
{
"text" : "World",
"is_starred" : true,
"type" : "message",
"ts" : "1358546515.000007",
"user" : "U2147483896"
},
{
"type" : "something_else",
"ts" : "1358546515.000007"
}
],
"ok" : true,
"latest" : "1358547726.000003"
}
Authentication
Sets the topic for a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
The new topic
Private channel to set the topic of
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Sets the purpose for a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
The new purpose
Private channel to set the purpose of
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Unarchives a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
Private channel to unarchive
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Archives a private channel.
Request headers
Authentication token. Requires scope: groups:write
Request body
Private channel to archive
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Gets information about a bot user.
Request parameters
Authentication token. Requires scope: users:read
Bot user to get info on
Responses
When no bot can be found, it returns an error.
Body
Examples
{
"ok" : false,
"error" : "bot_not_found"
}
When successful, returns bot info by bot ID.
Body
Examples
{
"bot" : {
"updated" : 1449272004,
"name" : "commandeer",
"icons" : {
"image_36" : "https://...",
"image_48" : "https://...",
"image_72" : "https://..."
},
"deleted" : false,
"app_id" : "A061BLERW",
"id" : "B061F7JQ1"
},
"ok" : true
}
Authentication
Set the profile information for a user.
Request headers
Authentication token. Requires scope: users.profile:write
Request body
Collection of key:value pairs presented as a URL-encoded JSON hash.
ID of user to change. This argument may only be specified by team admins on paid teams.
Value to set a single key to. Usable only if profile
is not passed.
Name of a single key to set. Usable only if profile
is not passed.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_profile"
}
Typical success response
Body
Examples
{
"profile" : {
"display_name" : "spengler",
"status_emoji" : ":books:",
"team" : "T012AB3C4",
"real_name" : "Egon Spengler",
"image_24" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"real_name_normalized" : "Egon Spengler",
"image_512" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"display_name_normalized" : "spengler",
"image_32" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_48" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_72" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"avatar_hash" : "ge3b51ca72de",
"status_text" : "Print is dead",
"email" : "spengler@ghostbusters.example.com",
"image_192" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg"
},
"ok" : true
}
Authentication
Retrieves a user’s profile information.
Request parameters
Authentication token. Requires scope: users.profile:read
Include labels for each ID in custom profile fields
User to retrieve profile info for
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "user_not_found"
}
Typical success response
Body
Examples
{
"profile" : {
"display_name" : "spengler",
"status_emoji" : ":books:",
"team" : "T012AB3C4",
"real_name" : "Egon Spengler",
"image_24" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"real_name_normalized" : "Egon Spengler",
"image_512" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"display_name_normalized" : "spengler",
"image_32" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_48" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_72" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"avatar_hash" : "ge3b51ca72de",
"status_text" : "Print is dead",
"email" : "spengler@ghostbusters.example.com",
"image_192" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg"
},
"ok" : true
}
Authentication
Manually sets user presence.
Request headers
Authentication token. Requires scope: users:write
Request body
Either auto
or away
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Gets information about a user.
Request parameters
Set this to true
to receive the locale for this user. Defaults to false
Authentication token. Requires scope: users:read
User to get info on
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "user_not_found"
}
Typical success response
Body
Examples
{
"ok" : true,
"user" : {
"profile" : {
"display_name" : "spengler",
"status_emoji" : ":books:",
"team" : "T012AB3C4",
"real_name" : "Egon Spengler",
"image_24" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"real_name_normalized" : "Egon Spengler",
"image_512" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"display_name_normalized" : "spengler",
"image_32" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_48" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_72" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"avatar_hash" : "ge3b51ca72de",
"status_text" : "Print is dead",
"email" : "spengler@ghostbusters.example.com",
"image_192" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg"
},
"updated" : 1502138686,
"tz" : "America/Los_Angeles",
"name" : "spengler",
"deleted" : false,
"is_app_user" : false,
"is_bot" : false,
"tz_label" : "Pacific Daylight Time",
"real_name" : "episod",
"color" : "9f69e7",
"team_id" : "T012AB3C4",
"is_admin" : true,
"is_ultra_restricted" : false,
"is_restricted" : false,
"is_owner" : false,
"tz_offset" : -25200,
"has_2fa" : false,
"id" : "W012A3CDE",
"is_primary_owner" : false
}
}
Authentication
Find a user with an email address.
Request parameters
Authentication token. Requires scope: users:read.email
An email address belonging to a user in the workspace
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "user_not_found"
}
Typical success response
Body
Examples
{
"ok" : true,
"user" : {
"profile" : {
"display_name" : "spengler",
"status_emoji" : ":books:",
"team" : "T012AB3C4",
"real_name" : "Egon Spengler",
"image_24" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"real_name_normalized" : "Egon Spengler",
"image_512" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"display_name_normalized" : "spengler",
"image_32" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_48" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_72" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"avatar_hash" : "ge3b51ca72de",
"status_text" : "Print is dead",
"email" : "spengler@ghostbusters.example.com",
"image_192" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg"
},
"updated" : 1502138686,
"tz" : "America/Los_Angeles",
"name" : "spengler",
"deleted" : false,
"is_app_user" : false,
"is_bot" : false,
"tz_label" : "Pacific Daylight Time",
"real_name" : "episod",
"color" : "9f69e7",
"team_id" : "T012AB3C4",
"is_admin" : true,
"is_ultra_restricted" : false,
"is_restricted" : false,
"is_owner" : false,
"tz_offset" : -25200,
"has_2fa" : false,
"id" : "W012A3CDE",
"is_primary_owner" : false
}
}
Authentication
Gets user presence information.
Request parameters
Authentication token. Requires scope: users:read
User to get presence info on. Defaults to the authed user.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
When requesting information for a different user, this method just returns the current presence (either active
or away
).
Body
Examples
{
"ok" : true,
"presence" : "active"
}
Authentication
Delete the user profile photo
Request body
Authentication token. Requires scope: users.profile:write
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Set the user profile photo
Request body
File contents via multipart/form-data
.
Width/height of crop box (always square)
Authentication token. Requires scope: users.profile:write
Y coordinate of top-left corner of crop box
X coordinate of top-left corner of crop box
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Get a user’s identity.
Request parameters
Authentication token. Requires scope: identity.basic
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "account_inactive"
}
You will receive at a minimum the following information:
Body
Examples
{
"ok" : true,
"user" : {
"name" : "Sonny Whether",
"id" : "U0G9QF9C6"
},
"team" : {
"id" : "T0G9PQBBK"
}
}
Authentication
Lists all users in a Slack team.
Request parameters
Whether to include presence data in the output. Setting this to false
improves performance, especially with large teams.
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.
Authentication token. Requires scope: users:read
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.
Set this to true
to receive the locale for users. Defaults to false
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_cursor"
}
Typical success response
Body
Examples
{
"cache_ts" : 1498777272,
"ok" : true,
"response_metadata" : {
"next_cursor" : "dXNlcjpVMEc5V0ZYTlo="
},
"members" : [
{
"profile" : {
"display_name" : "spengler",
"status_emoji" : ":books:",
"team" : "T012AB3C4",
"real_name" : "Egon Spengler",
"image_24" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"real_name_normalized" : "Egon Spengler",
"image_512" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"display_name_normalized" : "spengler",
"image_32" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_48" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"image_72" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
"avatar_hash" : "ge3b51ca72de",
"status_text" : "Print is dead",
"email" : "spengler@ghostbusters.example.com",
"image_192" : "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg"
},
"updated" : 1502138686,
"tz" : "America/Los_Angeles",
"name" : "spengler",
"deleted" : false,
"is_app_user" : false,
"is_bot" : false,
"tz_label" : "Pacific Daylight Time",
"real_name" : "spengler",
"color" : "9f69e7",
"team_id" : "T012AB3C4",
"is_admin" : true,
"is_ultra_restricted" : false,
"is_restricted" : false,
"is_owner" : false,
"tz_offset" : -25200,
"has_2fa" : false,
"id" : "W012A3CDE",
"is_primary_owner" : false
},
{
"profile" : {
"first_name" : "Glinda",
"last_name" : "Southgood",
"display_name" : "Glinda the Fairly Good",
"title" : "Glinda the Good",
"image_1024" : "https://a.slack-edge.com...png",
"skype" : "",
"phone" : "",
"real_name" : "Glinda Southgood",
"image_24" : "https://a.slack-edge.com...png",
"image_original" : "https://a.slack-edge.com...png",
"real_name_normalized" : "Glinda Southgood",
"image_512" : "https://a.slack-edge.com...png",
"image_32" : "https://a.slack-edge.com...png",
"image_48" : "https://a.slack-edge.com...png",
"image_72" : "https://a.slack-edge.com...png",
"avatar_hash" : "8fbdd10b41c6",
"display_name_normalized" : "Glinda the Fairly Good",
"email" : "glenda@south.oz.coven",
"image_192" : "https://a.slack-edge.com...png"
},
"updated" : 1480527098,
"tz" : "America/Los_Angeles",
"name" : "glinda",
"deleted" : false,
"is_bot" : false,
"tz_label" : "Pacific Daylight Time",
"real_name" : "Glinda Southgood",
"color" : "9f69e7",
"team_id" : "T0G9PQBBK",
"is_admin" : true,
"is_ultra_restricted" : false,
"is_restricted" : false,
"is_owner" : false,
"tz_offset" : -25200,
"has_2fa" : false,
"id" : "W07QCRPA4",
"is_primary_owner" : false
}
]
}
Authentication
Marks a user as active.
Request headers
Authentication token. Requires scope: users:write
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "invalid_auth"
}
Typical success response
Authentication
Closes a direct message or multi-person direct message.
Request headers
Authentication token. Requires scope: conversations:write
Request body
Conversation to close.
Responses
Typical error response
Body
Examples
{
"ok" : false,
"error" : "channel_not_found"
}
Typical success response
Body
Examples
{
"ok" : true
}