Sample - Slack Web API
GET/pins.list

List pinned items in a channel

Lists the items pinned to a channel. Supply the channel identifier together with an authentication token that has permission to read pins. The response can contain either the pinned item collection or a count, depending on the returned result shape.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
tokenstringrequired
Authentication token with the `pins:read` scope.
channelstringrequired
Channel whose pinned items to retrieve.

2 status codes
200Returns `ok` set to true with either an `items` array containing pinned items or a `count` of pinned items.
defaultReturned when the channel cannot be found or authentication, permission, or request arguments are invalid; the response includes `ok` set to false and an `error` reason.
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:channel_not_foundnot_authedinvalid_authaccount_inactiveno_permissioninvalid_arg_nameinvalid_array_arginvalid_charsetinvalid_form_datainvalid_post_typemissing_post_typeteam_added_to_org
okbooleanrequired
Allowed:false

Error handling

The token must include the pins:read scope, and channel must identify the channel whose pinned items you want to retrieve. Do not omit either token or channel.