Attach media with Promo API

Promo API gives you a possibility to attach rich media to any other URL. In a sense, Iframely will merge the two links in the following way:

  • semantic attribution meta and click-through link - from original URL,
  • rich media and thumbnails - from promo URL, for example a friendly GIF
  • result embed code will be a promo card

Define media in as promo parameter

Add &promo= parameter in your API calls to oEmbed of Iframely endpoints to merge the two links together.

promo should be an URL-encoded canonical link to exact rich media, say YouTube or Vimeo or any of over 1800 domains that Iframely supports.

If Iframely finds players or images (not just thumbnails) for your promo URL, it will add it to your own source &url= and will return a Promo Card as HTML embed code.

To make your promo cards accessible to apps outside of Iframely ecosystem, you need to publish it as oEmbed. See oembed.com for spec details.

It is simple: you just add an oEmbed discovery link into the <head> section of your page's HTML:

<link rel="alternate" type="application/json+oembed" 
href="http://iframe.ly/api/oembed?url={your page URL here}&promo=...&api_key=..." />

<link rel="alternate" type="application/xml+oembed"
href="http://iframe.ly/api/oembed?url=...&promo=...&api_key=...&format=xml"/>

Replace ... with the actual values of your own page and media attachment. You can skip &promo= link if you already publish it in your meta.

Try it

Try our Klip To app to do this manually and have some fun experimenting with this feature.