Slack. Web. Groups
(SlackKit v1.0.0-alpha.0)
View Source
Summary
Functions
Archives a private channel.
Closes a private channel.
Creates a private channel.
Clones and archives a private channel.
Fetches history of messages and events from a private channel.
Gets information about a private channel.
Invites a user to a private channel.
Removes a user from a private channel.
Leaves a private channel.
Lists private channels that the calling user has access to.
Sets the read cursor in a private channel.
Opens a private channel.
Renames a private channel.
Retrieve a thread of messages posted to a private channel.
Sets the purpose for a private channel.
Sets the topic for a private channel.
Unarchives a private channel.
Functions
Archives a private channel.
API reference
Required Params
channel- Private channel to archive
Errors the API can return:
already_archived- Group has already been archived.channel_not_found- Value passed forchannelwas invalid.group_contains_others- Restricted accounts cannot archive groups containing others.last_ra_channel- You cannot archive the last channel for a restricted account.restricted_action- A team preference prevents the authenticated user from archiving.
See the Common Errors guide for errors returned by every Web API method.
Closes a private channel.
API reference
Required Params
channel- Private channel to close.
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.
See the Common Errors guide for errors returned by every Web API method.
Creates a private channel.
API reference
Required Params
name- Name of private channel to create
Errors the API can return:
name_taken- A group cannot be created with the given name.no_channel- No group name was passed.restricted_action- A team preference prevents the authenticated user from creating groups.
See the Common Errors guide for errors returned by every Web API method.
Clones and archives a private channel.
API reference
Required Params
channel- Private channel to clone and archive.
Errors the API can return:
already_archived- An archived group cannot be clonedchannel_not_found- Value passed forchannelwas invalid.restricted_action- A team preference prevents the authenticated user from creating groups.
See the Common Errors guide for errors returned by every Web API method.
Fetches history of messages and events from a private channel.
API reference
Required Params
channel- Private channel to fetch history for.
Optional Params
count- Number of messages to return, between 1 and 1000. ex:100inclusive- Include messages with latest or oldest timestamp in results. ex:1latest- End of time range of messages to include in results.oldest- Start of time range of messages to include in results.unreads- Includeunread_count_displayin the output? ex:1
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.invalid_ts_latest- Value passed forlatestwas invalidinvalid_ts_oldest- Value passed foroldestwas invalid
See the Common Errors guide for errors returned by every Web API method.
Gets information about a private channel.
API reference
Required Params
channel- Private channel to get info on
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.
See the Common Errors guide for errors returned by every Web API method.
Invites a user to a private channel.
API reference
Required Params
channel- Private channel to invite user to.user- User to invite.
Errors the API can return:
cant_invite- User cannot be invited to this group.cant_invite_self- Authenticated user cannot invite themselves to a group.channel_not_found- Value passed forchannelwas invalid.is_archived- Group has been archived.user_not_found- Value passed foruserwas invalid.
See the Common Errors guide for errors returned by every Web API method.
Removes a user from a private channel.
API reference
Required Params
channel- Private channel to remove user from.user- User to remove from private channel.
Errors the API can return:
cant_kick_self- You can't remove yourself from a groupchannel_not_found- Value passed forchannelwas invalid.not_in_group- User or caller were are not in the grouprestricted_action- A team preference prevents the authenticated user from kicking.user_not_found- Value passed foruserwas invalid.
See the Common Errors guide for errors returned by every Web API method.
Leaves a private channel.
API reference
Required Params
channel- Private channel to leave
Errors the API can return:
cant_leave_last_channel- Authenticated user cannot leave the last channel they are inchannel_not_found- Value passed forchannelwas invalid.is_archived- Group has been archived.last_member- Authenticated user is the last member of a group and cannot leave it
See the Common Errors guide for errors returned by every Web API method.
Lists private channels that the calling user has access to.
API reference
Optional Params
exclude_archived- Don't return archived private channels. ex:1
See the Common Errors guide for errors returned by every Web API method.
Sets the read cursor in a private channel.
API reference
Required Params
channel- Private channel to set reading cursor in.ts- Timestamp of the most recently seen message.
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.invalid_timestamp- Value passed fortimestampwas invalid.
See the Common Errors guide for errors returned by every Web API method.
Opens a private channel.
API reference
Required Params
channel- Private channel to open.
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.
See the Common Errors guide for errors returned by every Web API method.
Renames a private channel.
API reference
Required Params
channel- Private channel to renamename- New name for private channel.
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.invalid_name- New name is invalidname_taken- New channel name is taken
See the Common Errors guide for errors returned by every Web API method.
Retrieve a thread of messages posted to a private channel.
API reference
Required Params
channel- Private channel to fetch thread fromthread_ts- Unique identifier of a thread's parent message.
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.thread_not_found- Value for thread_ts was missing or invalid.
See the Common Errors guide for errors returned by every Web API method.
Sets the purpose for a private channel.
API reference
Required Params
channel- Private channel to set the purpose ofpurpose- The new purpose ex:My Purpose
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.is_archived- Private group has been archivedtoo_long- Purpose was longer than 250 characters.user_is_restricted- Setting the purpose is a restricted action.
See the Common Errors guide for errors returned by every Web API method.
Sets the topic for a private channel.
API reference
Required Params
channel- Private channel to set the topic oftopic- The new topic ex:My Topic
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.is_archived- Private group has been archivedtoo_long- Topic was longer than 250 characters.user_is_restricted- Setting the topic is a restricted action.
See the Common Errors guide for errors returned by every Web API method.
Unarchives a private channel.
API reference
Required Params
channel- Private channel to unarchive
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.not_archived- Group is not archived.
See the Common Errors guide for errors returned by every Web API method.