Slack. Web. Pins
(SlackKit v1.0.0-alpha.0)
View Source
Summary
Functions
Pins an item to a channel.
Lists items pinned to a channel.
Un-pins an item from a channel.
Functions
Pins an item to a channel.
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- Bot token:
pins:write - User token:
pins:write
Required Params
channel- Channel to pin the messsage to. You must also include atimestampwhen pinning messages. Both thechannelandtimestamparguments are functionally required. The providedchannelshould be the ID of a public or private channel you want to pin to and thetimestampshould be thetsvalue of a message within that conversation.
Optional Params
timestamp- Timestamp of the message to pin. You must also include thechannel. Both thechannelandtimestamparguments are functionally required. The providedchannelshould be the ID of a public or private channel you want to pin to and thetimestampshould be thetsvalue of a message within that conversation.
Errors the API can return:
already_pinned- The specified item is already pinned to the channel.bad_timestamp- Value passed fortimestampwas invalid.channel_not_found- Thechannelargument was not specified or was invalidexternal_channel_migrating- Channel is undergoing an active migration.file_not_found- File not found.file_not_shared- File specified byfileis not public nor shared to the channel.message_not_found- Message specified bychannelandtimestampdoes not exist.no_item_specified- One offile,file_comment, ortimestampwas not specified.not_in_channel- Item is not in channel.not_pinnable- This message type is not pinnable.restricted_action- The user does not have permission to add pins to the channel.too_many_pins- Too many pins in channel.
See the Common Errors guide for errors returned by every Web API method.
Lists items pinned to a channel.
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
Required Params
channel- Channel to get pinned items for.
Errors the API can return:
channel_not_found- Value passed forchannelwas invalid.restricted_action- The user does not have permission to view the channel.
See the Common Errors guide for errors returned by every Web API method.
Un-pins an item from a channel.
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- Bot token:
pins:write - User token:
pins:write
Required Params
channel- Channel where the item is pinned to. Thechannelargument is required and one offile,file_comment, ortimestampmust also be specified.
Optional Params
timestamp- Timestamp of the message to un-pin. Thechannelargument is required and one offile,file_comment, ortimestampmust also be specified.
Errors the API can return:
bad_timestamp- Value passed fortimestampwas invalid.channel_not_found- Thechannelargument was not specified or was invalidexternal_channel_migrating- Channel is undergoing an active migration.file_comment_not_found- File comment specified byfile_commentdoes not exist.file_not_found- File specified byfiledoes not exist.message_not_found- Message specified bychannelandtimestampdoes not exist.no_item_specified- One offile,file_comment, ortimestampwas not specified.no_pin- The pin could not be found.not_pinned- The specified item is not pinned to the channel.restricted_action- The user does not have permission to remove pins from the channel.
See the Common Errors guide for errors returned by every Web API method.