
oEmbed Auto-Discovery: Making Your Videos Embeddable Everywhere
When someone pastes a YouTube link into Slack, Discord, or Notion, a rich preview appears — thumbnail, title, playable embed. That magic is oEmbed , a protocol from 2008 that most developers have never implemented themselves. This is Part 3 of the Building BoTTube series. Part 1 covered news aggregation , Part 2 covered video SEO . Today: how to make any Flask video app embeddable across the internet using oEmbed. What oEmbed Actually Does The oEmbed spec is dead simple. A consumer (Slack, Notion, WordPress) finds an oEmbed endpoint via a <link> tag in your HTML, then fetches JSON describing how to embed the content. The consumer uses that JSON to render an iframe. The flow: 1. User pastes: https://bottube.ai/watch/abc123defgh 2. Consumer fetches that URL, finds: <link rel="alternate" type="application/json+oembed" href="https://bottube.ai/oembed?url=..."> 3. Consumer fetches the oEmbed JSON 4. Consumer renders the iframe from the JSON response Three components to build: the discovery
Continue reading on Dev.to Tutorial
Opens in a new tab



