微博开放平台
微连接
移动应用
网站接入
电商服务商
电商商家
数据服务
数据服务
合作伙伴
微博支付
轻应用
粉丝服务
文档
推广
我的应用
登录
weibo
开发文档
首页
平台政策与指引
概述
平台公约
新手指南
开发者协议
应用运营管理规范
微连接分级管理办法
应用审核产品指南
应用安全开发注意事项
平台应用设计规范
微服务接入指南
微博登录接入
用微博帐号登录
授权机制
移动应用接入
移动应用介绍
移动应用SSO授权
微博Deep Link
媒体接入平台
头条文章开放接口
视频上传开放接口
电商接入平台
电商服务商接入
电商商家端接入
电商平台能力接口
粉丝服务平台
粉丝服务平台
新手接入指南
微信开发者迁移指南
接收消息
发送消息
自定义菜单
用户管理
生成带参数的二维码
Fans Service Platform
商业接口
商业数据接入指南
订阅服务手册(中文版)
订阅服务手册(英文版)
商业接口-REST API
商业数据常见问题
网站接入
网站接入介绍
微博API
微博API
接口访问频次权限
资源下载
SDK
微博标识下载
常见问题
联系我们
工具箱
链入页面
链出更改
特殊页面
查看源代码
跳转到:
导航
,
搜索
根据下列原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
'''SINA WEIBO LIVE API''' <div class="wiki_txtJ"> Read the following documents to help you understand how to use the Live API. </div> == Authorization Mechanism == Currently we use OAuth2.0 for user authentication ,see [http://open.weibo.com/wiki/OAuth/en Oauth authorization] ==Access Frequency Limit== Access Level:<span style="color:#FF7D13;">Common Interface</span> Frequency limit:<span style="color:#FF7D13;">Yes, 300 times per day per user</span> ==Creating a Live Video== URL: https://api.weibo.com/2/proxy/live/create [POST] Description:Create a live object, return an RTMP stream url, and post weibo at the same time Parameter: {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Parameter field !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Requires !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description {{api_args|access_token|true|string|OAuth authorization}} {{api_args|title|true|string|Live Description}} {{api_args|width|true|string|Live Width}} {{api_args|height|true|string|Live Height}} {{api_args|summary|false|string|weibo text content(URLencode),does not exceed 130 Chinese characters}} {{api_args|published|false|string|whether to publish,0:public,1:only me visible,default 0}} {{api_args|image|false|string|cover image url, upload picture API see [http://open.weibo.com/wiki/Live/api/en#Upload Upload Picture API]。}} {{api_args|replay|false|string|whether to record,0:not to record,1:record,default 1}} |} Return: {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Parameter field !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type !width="75%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description {{rdes_args|id|string|Live ID}} {{rdes_args|rtmp_url|string|RTMP stream url}} {{rdes_args|room_id|string|Room id}} |} Example: <pre class="brush:js"> { "id": "230916c5fc9c48670bf72b9135261865ef35cd", "room_id": "1042097:5617ce1cc0f822ebd37f93a0275c8660", "url": "rtmp://ps.live.weibo.com/***/c5fc9c48670bf72b9135261865ef35cd?auth_key=***" } </pre> ==Live Streaming== You can push the stream based on the url returned by the Create Live API ==Updating a Live Video== URL : https://api.weibo.com/2/proxy/live/update [POST] Descriptioin:update the properties of a live video Parameters: {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Parameter field !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Selected !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description {{api_args|access_token|true|string|OAuth authorization}} {{api_args|id|true|string|Live ID}} {{api_args|title|false|string|Live Description}} {{api_args|summary|false|string|weibo text content(URLencode),does not exceed 130 Chinese characters}} {{api_args|published|false|string|whether to publish,0:public,1:only me visible,2:not to pubish default 2}} {{api_args|image|false|string|cover image url}} {{api_args|stop|false|string|end live,0:live,1:live end,default 0}} {{api_args|replay_url|false|string|live replay url}} |} Return: {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Parameter field !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type !width="75%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description {{rdes_args|id|string|Live ID}} |} Example: <pre class="brush:js"> { "id": "230916c5fc9c48670bf72b9135261865ef35cd" } </pre> ==Deleting a Live Video== URL : https://api.weibo.com/2/proxy/live/delete [POST] Description:delete the entire live object Parameters: {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Parameter field !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Selected !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description {{api_args|access_token|true|string|Oauth authorizatioin}} {{api_args|id|true|string|Live ID}} |} Return: {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Parameter field !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type !width="75%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description {{rdes_args|id|string|Live ID}} |} Example: <pre class="brush:js"> { "id": "230916c5fc9c48670bf72b9135261865ef35cd" } </pre> ==Reading a Live Video== URL : https://api.weibo.com/2/proxy/live/show [POST] Description:get information about the live object parameter: {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Parameter field !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Selected !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description {{api_args|access_token|true|string|Oauth authorization}} {{api_args|id|true|string|Live ID}} {{api_args|detail|false|string|Live details,0:no return,1:return,default 0}} |} Return: {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Parameter field !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type !width="75%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description {{rdes_args|id|string|Live ID}} {{rdes_args|uid|string|Live author ID}} {{rdes_args|title|string|Live Title}} {{rdes_args|summary|string|weibo text content}} {{rdes_args|image|string|cover image url}} {{rdes_args|url|string|Live play url}} {{rdes_args|status|int|Live status}} {{rdes_args|create_time|string|Live Create time}} {{rdes_args|live_views|int|Live views,return when detail is 1}} {{rdes_args|total_views|int|Live total views,return when detail is 1}} {{rdes_args|total_stars|int|Live total likes,return when detail is 1}} |} Example: <pre class="brush:js"> { "id": "230912beaccf45a32ac3a36078b245ad8b5ddf", "uid": "2791445053", "title": "test title", "summary": "test summary", "url": "http://live.weibo.com/show?id=1042097:beaccf45a32ac3a36078b245ad8b5ddf", "status": 3, "create_time": "2016-10-20 16:40:29" } </pre> == Upload Picture == URL:https://api.weibo.com/statuses/upload_pic.json[POST] Descriptioin:upload live cover image parameter: {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Parameter field !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Selected !width="10%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description {{api_args| access_token |true|string|Oauth Authorization} {{api_args| pic |true| binary |image binary stream,only support JPEG、GIF、PNG format,image size must less than 5M。}} {{api_args|print_mark|false|int|whether with watermark,0:no,1:yes}} {{api_args|ori|false|int|whether to support the original image,0:do not support,1:support。}} |} //successful return <pre class="brush:js"> { "pic_id": "946308c5jw1dv288whtylj", "thumbnail_pic": "http://ww3.sinaimg.cn/thumbnail/946308c5jw1dv288whtylj.jpg", "bmiddle_pic": "http://ww3.sinaimg.cn/bmiddle/946308c5jw1dv288whtylj.jpg", "original_pic": "http://ww3.sinaimg.cn/large/946308c5jw1dv288whtylj.jpg" } </pre> //failure return <pre class="brush:js"> { "request": "/2/statuses/upload_pic.json", "error_code": "201XX", "error": "error message." } </pre> ==Live Interactive API == Refer to [http://open.weibo.com/wiki/Live/im/api/en Live Interactive API] ==Error Code== error code {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" |- !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|error code !width="40%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|error msg !width="45%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|description {{rdes_args|20001|live create error|create live failed}} {{rdes_args|20002|update weibo error|post weibo failed}} {{rdes_args|20003|post param loss|post parameter is missing}} {{rdes_args|20004|get param loss|get parameter is missing}} {{rdes_args|20005|live delete error|delete live failed}} {{rdes_args|20006|live update error|update live failed}} {{rdes_args|20007|send message error|comment failed}} {{rdes_args|20008|rsync message error|pull failed}} {{rdes_args|20009|live id unexist|live ID does not exist}} {{rdes_args|20010|weibo content more than 130 word|weibo text more than 130 words}} {{rdes_args|20011|msg content more than 100 word,or is null|comments more than 130 words,or empty}} {{rdes_args|20012|msg content type error|comment type is wrong}} {{rdes_args|20013|authority not allow|authority is not allowed(appkey or uid limit )}} {{rdes_args|20014|user not allow|uid limit}} |} Example: <pre class="brush:js"> { request : error_code : error : } </pre>
该页面使用的模板:
模板:Api args
(
查看源代码
)
模板:Rdes args
(
查看源代码
)
返回到
Live/api/en
。
反馈
分享
顶部