文档中心 > API类目 > 淘宝直播API

taobao.live.room.fetch.origin (微博直播详情轮询接口)

微博侧直播状态同步依赖中控台/主播app绑定关系,一旦解绑后微博侧无法获得直播间状态更新,会导致微博侧直播展示正在直播中,实际已经结束的情况。 所以需要实现一个接口:不依赖绑定授权,微博能直接根据直播id获取直播间详情状态。并限制接口只能是微博侧服务端调用。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
live_id String 必须 275947224638 直播间id

响应参数

名称 类型 示例值 描述
result Result 接口返回model
  • └ summary
  • String
  • demo
  • 直播间描述
  • └ share_text
  • String
  • 朋哥就是我正在直播中,场面异常火爆,小伙伴们速来围观~
  • 微博分享文案
  • └ embed_code
  • String
  • 1
  • embed_code
  • image
  • Image
  • 直播间封面图
  • └ width
  • Number
  • 630
  • 图宽
  • └ url
  • String
  • https://img.alicdn.com/imgextra/i2/O1CN015ZhfNl1fQxfZFqr0m_!!0-tbCommonAudio.jpg
  • 图片url
  • └ height
  • Number
  • 630
  • 图高
  • └ object_type
  • String
  • live
  • 返回值类型
  • └ stime
  • String
  • 2020-08-20 09:00:37
  • 开始时间
  • └ title
  • String
  • 娜比同款下单享满赠
  • 标题
  • └ display_name
  • String
  • 微博直播
  • 前端展示名
  • └ scheme_app_ios
  • String
  • taobao://h5.m.taobao.com/taolive/video.html?id=276121620495
  • iOS端分享链接
  • └ duration
  • Number
  • 0
  • 直播持续时间
  • └ app_android_url
  • String
  • https://play.google.com/store/apps/details?id=com.taobao.taobao
  • 安卓端分享链接
  • └ object_type_detail
  • String
  • taobaolive
  • 返回值类型详情
  • urls
  • Urls
  • 回放地址与播放url
  • └ replay_hd
  • String
  • http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b
  • 回放高清url
  • └ live_hd
  • String
  • http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b
  • 直播高清url
  • └ replay_ld
  • String
  • http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b
  • 回放流畅url
  • └ live_ld
  • String
  • http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b
  • 直播流畅url
  • └ live_flv_ld
  • String
  • http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.flv?auth_key=1600477232-0-0-d4876f2b7fc4375ae3032483b4a8beaf
  • 直播flv流畅url
  • └ rtmp_hd
  • String
  • http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b
  • rtmp高清url
  • └ live_flv_hd
  • String
  • http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.flv?auth_key=1600477232-0-0-d4876f2b7fc4375ae3032483b4a8beaf
  • 直播flv高清url
  • └ rtmp_ld
  • String
  • demo
  • rmtp流畅url
  • └ updated_at
  • String
  • 2020-08-20
  • 直播详情更新时间
  • └ etime
  • String
  • 0
  • 直播结束时间
  • └ id
  • String
  • 2002449489:5afc22ee-d0aa-4e82-a629-b3dc5c508eff
  • topic的id
  • └ app_ios_url
  • String
  • https://itunes.apple.com/us/app/%E6%B7%98%E5%AE%9D-%E9%9A%8F%E6%97%B6%E9%9A%8F%E5%9C%B0-%E6%83%B3%E6%B7%98%E5%B0%B1%E6%B7%98/id387682726?l=zh&ls=1&mt=8
  • 淘宝ios的app下载地址
  • └ scheme_app_android
  • String
  • taobao://h5.m.taobao.com/taolive/video.html?id=276121620495
  • 淘宝安卓的app下载地址
  • live
  • Live
  • 直播间元信息
  • └ width
  • Number
  • 320
  • 直播间宽
  • └ bitrate
  • Number
  • 700
  • 直播码率
  • └ height
  • Number
  • 480
  • 直播间高
  • └ status
  • Number
  • 1
  • 直播状态
  • author
  • Author
  • 微博用户信息
  • └ id
  • String
  • 微博用户id
  • └ display_name
  • String
  • 微博用户昵称
  • └ object_type
  • String
  • 用户类型
  • └ mid
  • String
  • 微博映射直播id
  • └ target_url
  • String
  • 目标url
  • └ url
  • String
  • 目标url
  • └ scheme_url
  • String
  • 直播间渲染url

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LiveRoomFetchOriginRequest req = new LiveRoomFetchOriginRequest();
req.setLiveId("275947224638");
LiveRoomFetchOriginResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<live_room_fetch_origin_response>
    <result>
        <summary>demo</summary>
        <share_text>朋哥就是我正在直播中,场面异常火爆,小伙伴们速来围观~</share_text>
        <embed_code>1</embed_code>
        <image>
            <width>630</width>
            <url>https://img.alicdn.com/imgextra/i2/O1CN015ZhfNl1fQxfZFqr0m_!!0-tbCommonAudio.jpg</url>
            <height>630</height>
        </image>
        <object_type>live</object_type>
        <stime>2020-08-20 09:00:37</stime>
        <title>娜比同款下单享满赠</title>
        <display_name>微博直播</display_name>
        <scheme_app_ios>taobao://h5.m.taobao.com/taolive/video.html?id=276121620495</scheme_app_ios>
        <duration>0</duration>
        <app_android_url>https://play.google.com/store/apps/details?id=com.taobao.taobao</app_android_url>
        <object_type_detail>taobaolive</object_type_detail>
        <urls>
            <replay_hd>http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b</replay_hd>
            <live_hd>http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b</live_hd>
            <replay_ld>http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b</replay_ld>
            <live_ld>http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b</live_ld>
            <live_flv_ld>http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.flv?auth_key=1600477232-0-0-d4876f2b7fc4375ae3032483b4a8beaf</live_flv_ld>
            <rtmp_hd>http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.m3u8?auth_key=1600477232-0-0-0d77681e42a71d29c5ca709b6f867c7b</rtmp_hd>
            <live_flv_hd>http://livecb.alicdn.com/mediaplatform/5afc22ee-d0aa-4e82-a629-b3dc5c508eff.flv?auth_key=1600477232-0-0-d4876f2b7fc4375ae3032483b4a8beaf</live_flv_hd>
            <rtmp_ld>demo</rtmp_ld>
        </urls>
        <updated_at>2020-08-20</updated_at>
        <etime>0</etime>
        <id>2002449489:5afc22ee-d0aa-4e82-a629-b3dc5c508eff</id>
        <app_ios_url>https://itunes.apple.com/us/app/%E6%B7%98%E5%AE%9D-%E9%9A%8F%E6%97%B6%E9%9A%8F%E5%9C%B0-%E6%83%B3%E6%B7%98%E5%B0%B1%E6%B7%98/id387682726?l=zh&amp;ls=1&amp;mt=8</app_ios_url>
        <scheme_app_android>taobao://h5.m.taobao.com/taolive/video.html?id=276121620495</scheme_app_android>
        <live>
            <width>320</width>
            <bitrate>700</bitrate>
            <height>480</height>
        </live>
        <status>1</status>
        <author>
            <id></id>
            <display_name></display_name>
            <object_type></object_type>
        </author>
        <mid></mid>
        <target_url></target_url>
        <url></url>
        <scheme_url></scheme_url>
    </result>
</live_room_fetch_origin_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部