Skip to main content

Video block

Welcome to the new home of Slack developer docs!

We're still building and not all features are available quite yet. Enjoy this peek into the future!

Not ready for the future? Return to the past at api.slack.com.

Fields

PropertyTypeDescriptionRequired?
typestringThe type of block. For a video block, type will always be video.Required
alt_textstringA tooltip for the video. Required for accessibilityRequired
author_namestringAuthor name to be displayed. Must be less than 50 characters.Optional
block_idstringA unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of a message. If a message is updated, use a new block_id.Optional
descriptionObjectDescription for video in the form of a text object that must have type of plain_text. text within must be less than 200 characters.Preferred
provider_icon_urlstringIcon for the video provider, e.g. YouTube icon.Optional
provider_namestringThe originating application or domain of the video, e.g. YouTube.Optional
titleObjectVideo title in the form of a text object that must have type of plain_text. text within must be less than 200 characters.Required
title_urlstringHyperlink for the title text. Must correspond to the non-embeddable URL for the video. Must go to an HTTPS URL.Preferred
thumbnail_urlstringThe thumbnail image URLRequired
video_urlstringThe URL to be embedded. Must match any existing unfurl domains within the app and point to a HTTPS URL.Required

Usage info

A video block is designed to embed videos in all app surfaces (e.g. link unfurls, messages, modals, App Home) — anywhere you can put blocks! To use the video block within your app, you must have the links.embed:write scope.

The metadata received in the block payload will be used to construct the description, provider, and title of the video in all clients. Developers have the flexibility to leave non-mandatory fields null and use other blocks to format this content.

Requirements

  • Video blocks can only be posted by apps; users are not allowed to post embedded videos directly from Block Kit Builder.
  • Your app must have the the links.embed:write scope for both user and bot tokens.
  • video_url has to be included in the unfurl domains specified in your app.
  • video_url should be publicly accessible, unless the app relies on information received from the Events API payloads to make a decision on whether the viewer(s) of the content should have access. If so, the service could create a unique URL accessible only via Slack.
  • video_url must be compatible with an embeddable iFrame.
  • video_url must return a 2xx code OR 3xx with less than 5 redirects and an eventual 2xx.
  • video_url must not point to any Slack-related domain.

Constraints

  • Embeddable video players only (audio-only permitted)
  • Navigation, scrolling and overlays are not allowed within the iFrame.
  • Interactivity (e.g. likes, comments, and reactions) are allowed within your player but shouldn't completely overlay or navigate away from the content being embedded. These interactions will be anonymous since no user data is transferred to the embedded view.

Example

An example of a video block for web

{
"type": "video",
"title": {
"type": "plain_text",
"text": "Use the Events API to create a dynamic App Home",
"emoji": true
},
"title_url": "https://www.youtube.com/watch?v=8876OZV_Yy0",
"description": {
"type": "plain_text",
"text": "Slack sure is nifty!",
"emoji": true
},
"video_url": "https://www.youtube.com/embed/8876OZV_Yy0?feature=oembed&autoplay=1",
"alt_text": "Use the Events API to create a dynamic App Home",
"thumbnail_url": "https://i.ytimg.com/vi/8876OZV_Yy0/hqdefault.jpg",
}