How to preview a video website card?


We know that there is no preview api for card,
So we get the card info by /cards/video_website/:id ,

      "video_poster_height": "9",
      "name": "カード名",
      "website_shortened_url": "",
      "video_height": "9",
      "video_url": "",

and tried to make a card preview like the following.

  <video src={video_url} />
 <span>card title</span>

But video_url seems not worked?
Do you have any good idea?

Thanks in advance.

#2 We don’t currently have a way to generate HTML previews for Video Website Cards using the GET accounts/:account_id/tweet/preview.

[G]iven that we’re still working toward adding card_uri support for this endpoint, it currently does not support Video Website Cards.

Announcement: Tweet preview improvements.

For existing Tweets with a Video Website Card attached, you can use the GET accounts/:account_id/tweet/preview/:tweet_id endpoint to retrieve the HTML preview.

Thanks for the question.


Thanks so much.

I meant to preview a card, not a tweet,
but the “video_url” get by /cards/video_website/:id seemed not work when do sth with it like below.

  <video src={video_url} />
 <span>card title</span>


I see what you mean. Thanks for the clarification.

You’ve got two options here.

  1. Using the card’s video_content_id, you can look up the video details using the GET accounts/:account_id/videos/:video_id endpoint. The preview_url for the video entity is a URL for the .mp4 file.
  2. You can parse the .vmap to get at the .mp4. Through this approach, we typically provide options for a few different bitrates.

I hope this helps.