Live/api/en
(→Creating a Live Video) |
|||
(未显示1个用户的14个中间版本) | |||
第8行: | 第8行: | ||
− | == | + | == 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;" | {| 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"| | + | !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"| | + | !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"| | + | !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"| | + | !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description |
− | {{api_args|access_token|true|string| | + | {{api_args|access_token|true|string|OAuth authorization}} |
− | {{api_args|title|true|string| | + | {{api_args|title|true|string|Live Description}} |
− | {{api_args|width|true|string| | + | {{api_args|width|true|string|Live Width}} |
− | {{api_args|height|true|string| | + | {{api_args|height|true|string|Live Height}} |
− | {{api_args|summary|false|string| | + | {{api_args|summary|false|string|weibo text content(URLencode),does not exceed 130 Chinese characters}} |
− | {{api_args|published|false|string| | + | {{api_args|published|false|string|whether to publish,0:public,1:only me visible,default 0}} |
− | {{api_args|image|false|string| | + | {{api_args|image|false|string|cover image url, upload picture API see [http://open.weibo.com/wiki/Live/api/en#Upload_Picture Upload Picture API]。}} |
− | {{api_args|replay|false|string| | + | {{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;" | {| 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"| | + | !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"| | + | !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"| | + | !width="75%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description |
− | {{rdes_args|id|string| | + | {{rdes_args|id|string|Live ID}} |
− | {{rdes_args|rtmp_url|string| | + | {{rdes_args|rtmp_url|string|RTMP stream url}} |
− | {{rdes_args|room_id|string| | + | {{rdes_args|room_id|string|Room id}} |
|} | |} | ||
− | + | Example: | |
<pre class="brush:js"> | <pre class="brush:js"> | ||
第66行: | 第65行: | ||
</pre> | </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] | 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;" | {| 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"| | + | !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"| | + | !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"| | + | !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"| | + | !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description |
− | {{api_args|access_token|true|string| | + | {{api_args|access_token|true|string|OAuth authorization}} |
− | {{api_args|id|true|string| | + | {{api_args|id|true|string|Live ID}} |
− | {{api_args|title|false|string| | + | {{api_args|title|false|string|Live Description}} |
− | {{api_args|summary|false|string| | + | {{api_args|summary|false|string|weibo text content(URLencode),does not exceed 130 Chinese characters}} |
− | {{api_args|published|false|string| | + | {{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| | + | {{api_args|image|false|string|cover image url}} |
− | {{api_args|stop|false|string| | + | {{api_args|stop|false|string|end live,0:live,1:live end,default 0}} |
− | {{api_args|replay_url|false|string| | + | {{api_args|replay_url|false|string|live replay url}} |
|} | |} | ||
− | + | Return: | |
{| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" | {| 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"| | + | !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"| | + | !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"| | + | !width="75%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description |
− | {{rdes_args|id|string| | + | {{rdes_args|id|string|Live ID}} |
|} | |} | ||
− | + | Example: | |
<pre class="brush:js"> | <pre class="brush:js"> | ||
第113行: | 第112行: | ||
</pre> | </pre> | ||
− | == | + | ==Deleting a Live Video== |
URL : https://api.weibo.com/2/proxy/live/delete [POST] | 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;" | {| 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"| | + | !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"| | + | !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"| | + | !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"| | + | !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description |
− | {{api_args|access_token|true|string| | + | {{api_args|access_token|true|string|Oauth authorizatioin}} |
− | {{api_args|id|true|string| | + | {{api_args|id|true|string|Live ID}} |
|} | |} | ||
− | + | Return: | |
{| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color:#CCCCCC;" | {| 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"| | + | !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"| | + | !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"| | + | !width="75%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description |
− | {{rdes_args|id|string| | + | {{rdes_args|id|string|Live ID}} |
|} | |} | ||
− | + | Example: | |
<pre class="brush:js"> | <pre class="brush:js"> | ||
第149行: | 第148行: | ||
</pre> | </pre> | ||
− | == | + | ==Reading a Live Video== |
URL : https://api.weibo.com/2/proxy/live/show [POST] | 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;" | {| 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"| | + | !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"| | + | !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"| | + | !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"| | + | !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description |
− | {{api_args|access_token|true|string| | + | {{api_args|access_token|true|string|Oauth authorization}} |
− | {{api_args|id|true|string| | + | {{api_args|id|true|string|Live ID}} |
− | {{api_args|detail|false|string| | + | {{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;" | {| 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"| | + | !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"| | + | !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"| | + | !width="75%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description |
− | {{rdes_args|id|string| | + | {{rdes_args|id|string|Live ID}} |
− | {{rdes_args|uid|string| | + | {{rdes_args|uid|string|Live author ID}} |
− | {{rdes_args|title|string| | + | {{rdes_args|title|string|Live Title}} |
− | {{rdes_args|summary|string| | + | {{rdes_args|summary|string|weibo text content}} |
− | {{rdes_args|image|string| | + | {{rdes_args|image|string|cover image url}} |
− | {{rdes_args|url|string| | + | {{rdes_args|url|string|Live play url}} |
− | {{rdes_args|status|int| | + | {{rdes_args|status|int|Live status}} |
− | {{rdes_args|create_time|string| | + | {{rdes_args|create_time|string|Live Create time}} |
− | {{rdes_args|live_views|int| | + | {{rdes_args|live_views|int|Live views,return when detail is 1}} |
− | {{rdes_args|total_views|int| | + | {{rdes_args|total_views|int|Live total views,return when detail is 1}} |
− | {{rdes_args|total_stars|int| | + | {{rdes_args|total_stars|int|Live total likes,return when detail is 1}} |
|} | |} | ||
− | + | Example: | |
<pre class="brush:js"> | <pre class="brush:js"> | ||
第194行: | 第193行: | ||
"id": "230912beaccf45a32ac3a36078b245ad8b5ddf", | "id": "230912beaccf45a32ac3a36078b245ad8b5ddf", | ||
"uid": "2791445053", | "uid": "2791445053", | ||
− | "title": " | + | "title": "test title", |
− | "summary": " | + | "summary": "test summary", |
"url": "http://live.weibo.com/show?id=1042097:beaccf45a32ac3a36078b245ad8b5ddf", | "url": "http://live.weibo.com/show?id=1042097:beaccf45a32ac3a36078b245ad8b5ddf", | ||
"status": 3, | "status": 3, | ||
第202行: | 第201行: | ||
</pre> | </pre> | ||
− | == | + | == Upload Picture == |
URL:https://api.weibo.com/statuses/upload_pic.json[POST] | 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;" | {| 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"| | + | !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"| | + | !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"| | + | !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"| | + | !width="65%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description |
− | {{api_args| access_token |true|string| | + | {{api_args| access_token |true|string|Oauth Authorization}} |
− | {{api_args| pic |true| binary | | + | {{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| | + | {{api_args|print_mark|false|int|whether with watermark,0:no,1:yes}} |
− | {{api_args|ori|false|int| | + | {{api_args|ori|false|int|whether to support the original image,0:do not support,1:support。}} |
|} | |} | ||
− | + | //successful return | |
− | + | ||
− | // | + | |
<pre class="brush:js"> | <pre class="brush:js"> | ||
第245行: | 第237行: | ||
− | // | + | //failure return |
<pre class="brush:js"> | <pre class="brush:js"> | ||
第255行: | 第247行: | ||
</pre> | </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;" | {| 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"| | + | !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"| | + | !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"| | + | !width="45%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|description |
− | {{rdes_args|20001|live create error| | + | {{rdes_args|20001|live create error|create live failed}} |
− | {{rdes_args|20002|update weibo error| | + | {{rdes_args|20002|update weibo error|post weibo failed}} |
− | {{rdes_args|20003|post param loss| | + | {{rdes_args|20003|post param loss|post parameter is missing}} |
− | {{rdes_args|20004|get param loss| | + | {{rdes_args|20004|get param loss|get parameter is missing}} |
− | {{rdes_args|20005|live delete error| | + | {{rdes_args|20005|live delete error|delete live failed}} |
− | {{rdes_args|20006|live update error| | + | {{rdes_args|20006|live update error|update live failed}} |
− | {{rdes_args|20007|send message error| | + | {{rdes_args|20007|send message error|comment failed}} |
− | {{rdes_args|20008|rsync message error| | + | {{rdes_args|20008|rsync message error|pull failed}} |
− | {{rdes_args|20009|live id unexist| | + | {{rdes_args|20009|live id unexist|live ID does not exist}} |
− | {{rdes_args|20010|weibo content more than 130 word| | + | {{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| | + | {{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| | + | {{rdes_args|20012|msg content type error|comment type is wrong}} |
− | {{rdes_args|20013|authority not allow| | + | {{rdes_args|20013|authority not allow|authority is not allowed(appkey or uid limit )}} |
− | {{rdes_args|20014|user not allow| | + | {{rdes_args|20014|user not allow|uid limit}} |
|} | |} | ||
− | + | Example: | |
<pre class="brush:js"> | <pre class="brush:js"> |
2017年2月24日 (五) 16:42的最后版本
SINA WEIBO LIVE API
Read the following documents to help you understand how to use the Live API.
目录 |
Authorization Mechanism
Currently we use OAuth2.0 for user authentication ,see Oauth authorization
Access Frequency Limit
Access Level:Common Interface
Frequency limit:Yes, 300 times per day per user
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:
Parameter field | Requires | Field Type | Field Description |
---|---|---|---|
access_token | true | string | OAuth authorization |
title | true | string | Live Description |
width | true | string | Live Width |
height | true | string | Live Height |
summary | false | string | weibo text content(URLencode),does not exceed 130 Chinese characters |
published | false | string | whether to publish,0:public,1:only me visible,default 0 |
image | false | string | cover image url, upload picture API see Upload Picture API。 |
replay | false | string | whether to record,0:not to record,1:record,default 1 |
Return:
Parameter field | Field Type | Field Description |
---|---|---|
id | string | Live ID |
rtmp_url | string | RTMP stream url |
room_id | string | Room id |
Example:
{ "id": "230916c5fc9c48670bf72b9135261865ef35cd", "room_id": "1042097:5617ce1cc0f822ebd37f93a0275c8660", "url": "rtmp://ps.live.weibo.com/***/c5fc9c48670bf72b9135261865ef35cd?auth_key=***" }
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:
Parameter field | Requires | Field Type | Field Description |
---|---|---|---|
access_token | true | string | OAuth authorization |
id | true | string | Live ID |
title | false | string | Live Description |
summary | false | string | weibo text content(URLencode),does not exceed 130 Chinese characters |
published | false | string | whether to publish,0:public,1:only me visible,2:not to pubish default 2 |
image | false | string | cover image url |
stop | false | string | end live,0:live,1:live end,default 0 |
replay_url | false | string | live replay url |
Return:
Parameter field | Field Type | Field Description |
---|---|---|
id | string | Live ID |
Example:
{ "id": "230916c5fc9c48670bf72b9135261865ef35cd" }
Deleting a Live Video
URL : https://api.weibo.com/2/proxy/live/delete [POST]
Description:delete the entire live object
Parameters:
Parameter field | Requires | Field Type | Field Description |
---|---|---|---|
access_token | true | string | Oauth authorizatioin |
id | true | string | Live ID |
Return:
Parameter field | Field Type | Field Description |
---|---|---|
id | string | Live ID |
Example:
{ "id": "230916c5fc9c48670bf72b9135261865ef35cd" }
Reading a Live Video
URL : https://api.weibo.com/2/proxy/live/show [POST]
Description:get information about the live object
parameter:
Parameter field | Requires | Field Type | Field Description |
---|---|---|---|
access_token | true | string | Oauth authorization |
id | true | string | Live ID |
detail | false | string | Live details,0:no return,1:return,default 0 |
Return:
Parameter field | Field Type | Field Description |
---|---|---|
id | string | Live ID |
uid | string | Live author ID |
title | string | Live Title |
summary | string | weibo text content |
image | string | cover image url |
url | string | Live play url |
status | int | Live status |
create_time | string | Live Create time |
live_views | int | Live views,return when detail is 1 |
total_views | int | Live total views,return when detail is 1 |
total_stars | int | Live total likes,return when detail is 1 |
Example:
{ "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" }
Upload Picture
URL:https://api.weibo.com/statuses/upload_pic.json[POST]
Descriptioin:upload live cover image
parameter:
Parameter field | Requires | Field Type | Field Description |
---|---|---|---|
access_token | true | string | Oauth Authorization |
pic | true | binary | image binary stream,only support JPEG、GIF、PNG format,image size must less than 5M。 |
print_mark | false | int | whether with watermark,0:no,1:yes |
ori | false | int | whether to support the original image,0:do not support,1:support。 |
//successful return
{ "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" }
//failure return
{ "request": "/2/statuses/upload_pic.json", "error_code": "201XX", "error": "error message." }
Live Interactive API
Refer to Live Interactive API
Error Code
error code
error code | error msg | description |
---|---|---|
20001 | live create error | create live failed |
20002 | update weibo error | post weibo failed |
20003 | post param loss | post parameter is missing |
20004 | get param loss | get parameter is missing |
20005 | live delete error | delete live failed |
20006 | live update error | update live failed |
20007 | send message error | comment failed |
20008 | rsync message error | pull failed |
20009 | live id unexist | live ID does not exist |
20010 | weibo content more than 130 word | weibo text more than 130 words |
20011 | msg content more than 100 word,or is null | comments more than 130 words,or empty |
20012 | msg content type error | comment type is wrong |
20013 | authority not allow | authority is not allowed(appkey or uid limit ) |
20014 | user not allow | uid limit |
Example:
{ request : error_code : error : }