Slack.Web.Bookmarks (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Add bookmark to a channel.

List bookmark for the channel.

Remove bookmark from the channel.

Functions

add(title, type, optional_params \\ %{})

Add bookmark to a channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • title - Title for the bookmark. Bookmarking a link requires: channel_id, title, type, and a url:
  • type - Type of the bookmark i.e link. Bookmarking a link requires: channel_id, title, type, and a url:

Optional Params

  • access_level - The level that we are setting the file's permission to (read or write) Acceptable values: read write
  • channel_id - Channel to add bookmark in. Required for public channels. Bookmarking a link requires: channel_id, title, type, and a url:
  • emoji - Emoji tag to apply to the link.
  • entity_id - ID of the entity being bookmarked. Only applies to message and file types.
  • link - Link to bookmark. Bookmarking a link requires: channel_id, title, type, and a url:
  • parent_id - Id of this bookmark's parent

Errors the API can return:

  • cannot_bookmark_from_external_org - File is an external file and cannot be bookmarked.
  • cannot_bookmark_restricted_sharing_enabled - File has restricted sharing enabled and cannot be bookmarked.
  • channel_not_found - Channel cannot be found.
  • file_already_added - The file has already been added to the folder.
  • file_not_found - File cannot be found.
  • invalid_app_action_type - App action type is not valid.
  • invalid_bookmark_type - Bookmark type is not valid.
  • invalid_child_type - Child type is not valid.
  • invalid_emoji - Invalid emoji, does not follow the pattern of a valid emoji name.
  • invalid_entity_id - Invalid entity_id, file or message type bookmark should have original file or message ID.
  • invalid_link - Invalid link, link should begin with either http:// or https://.
  • invalid_parent_type - Parent type is not valid.
  • invalid_shortcut_type - Shortcut type is not valid.
  • not_implemented - bookmarking not available for the user.
  • parent_bookmark_disabled - Parent bookmark feature flag is off.
  • parent_with_link - Parent bookmark should not have link.
  • permission_denied - No permission to perform this operation.
  • slack_connect_blocked_file_type - Files with certain extensions are blocked from being uploaded in all Slack Connect communications
  • slack_connect_clip_sharing_blocked - Admin has disabled Clip sharing in Slack Connect channels
  • slack_connect_file_upload_sharing_blocked - Admin has disabled File uploads in all Slack Connect communications
  • too_many_bookmarks - Bookmark limit reached for channel.
  • too_many_requests - Too many concurrent requests. Please retry.
  • too_many_tabs - tab limit reached for channel.

See the Common Errors guide for errors returned by every Web API method.

edit(optional_params \\ %{})

Edit bookmark.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Optional Params

  • bookmark_id - Bookmark to update. Required for public channels.
  • channel_id - Channel to update bookmark in. Required for public channels.
  • emoji - Emoji tag to apply to the link.
  • link - Link to bookmark.
  • title - Title for the bookmark.

Errors the API can return:

  • channel_not_found - Channel cannot be found.
  • invalid_bookmark_type - Bookmark type is not valid.
  • invalid_emoji - Invalid emoji, does not follow the pattern of a valid emoji name.
  • invalid_link - Invalid link, link should begin with either http:// or https://.
  • not_found - Bookmark cannot be found.
  • not_implemented - bookmarking not available for the user.
  • parent_with_link - Parent bookmark should not have link.
  • permission_denied - No permission to perform this operation.
  • slack_connect_blocked_file_type - Files with certain extensions are blocked from being uploaded in all Slack Connect communications
  • slack_connect_clip_sharing_blocked - Admin has disabled Clip sharing in Slack Connect channels
  • slack_connect_file_upload_sharing_blocked - Admin has disabled File uploads in all Slack Connect communications

See the Common Errors guide for errors returned by every Web API method.

list(optional_params \\ %{})

List bookmark for the channel.

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Optional Params

  • channel_id - Channel to list bookmarks in. Required for public channels.

Errors the API can return:

  • channel_not_found - Channel cannot be found.
  • not_implemented - bookmarking not available for the user.

See the Common Errors guide for errors returned by every Web API method.

remove(optional_params \\ %{})

Remove bookmark from the channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Optional Params

  • bookmark_id - Bookmark to remove. Required for public channels.
  • channel_id - Channel to remove bookmark. Required for public channels.
  • quip_section_id - Quip section ID to unbookmark

Errors the API can return:

  • channel_not_found - Channel cannot be found.
  • invalid_bookmark_type - Bookmark type is not valid.
  • not_found - Bookmark cannot be found.
  • not_implemented - bookmarking not available for the user.
  • permission_denied - No permission to perform this operation.
  • user_not_found - User cannot be found.

See the Common Errors guide for errors returned by every Web API method.