TwentyThree Developer APIAPI Method: /api/player/embed

API Method: /api/player/embed

Last updated on March 19, 2015.

Get a player embed code for a URL or an object.

Parameters

Look up the embed code for this URL. If the request is signed with read permissions or higher you may use an additional include_unpublished_p parameter to have unpublished content return for embed.
ParameterDescription
url
widthThe desired width of the embed code.
heightThe desired height of the embed code.
responsive_pBoolean indicating whether to return a responsive embed code (defaults to 1).
iframe_pBoolean indicating whether to return an iframe embed code (defaults to 1).

These other parameters can be used and will be forwarded to the generated embed code:

  • photo_id
  • live_id
  • user_id
  • album_id
  • token
  • search
  • tag
  • autoplay_p
  • source
  • start

Permission level

The minimum required permission level is:

anoymous

Example XML Response

<response status="ok" permission_level="anonymous" cached="0">
    <embed_code>&lt;div style="width:100%; height:0; position: relative; padding-bottom:56.24999999296875%"&gt;&lt;iframe src="http://video.mydomain.com/v.ihtml/player.html?live%5fid=4642498&amp;source=embed&amp;autoPlay=0" style="width:100%; height:100%; position: absolute; top: 0; left: 0;" frameborder="0" border="0" scrolling="no" allowfullscreen="1" mozallowfullscreen="1" webkitallowfullscreen="1"&gt;&lt;/iframe&gt;&lt;/div&gt;</embed_code>
</response>

Example JSON Response

{
  "status": "ok", 
  "permission_level":"anonymous",
  "cached":"0",
  "embed":{"embed_code": "<div style='width:100%; height:0; position: relative; padding-bottom:56.24999999296875%'><iframe src='http://video.mydomain.com/v.ihtml/player.html?live%5fid=4642498&source=embed&autoPlay=0' style='width:100%; height:100%; position: absolute; top: 0; left: 0;' frameborder='0' border='0' scrolling='no' allowfullscreen='1' mozallowfullscreen='1' webkitallowfullscreen='1'></iframe></div>"},
  "p": "1",
  "size": "1",
  "site": {...},
  "endpoint": "/api/player/embed"
}