Live broadcast service OPEN API

Read the following documents to help you understand how to use the microblog live interface.


At present, Oauth2.0 is used for user identity authentication on Weibo open platform. See How to login authorization

For frequency limit, refer to Description of interface access rights


Create live broadcast

https://api.weibo.com/2/proxy/live/create

POST

Create a new live broadcast object, obtain the live broadcast streaming address, and send microblog at the same time

parameter

Parameter fields Field required Field Type Field Description
access_token true string The OAuth authorization method is a required parameter, which is obtained after OAuth authorization
title true string Live broadcast description
width true string Live broadcast width
height true string Live broadcast height
summary false string The content of microblog text must be URLencode, and the content should not exceed 130 Chinese characters
published false string Whether Weibo is published, 0: public publishing, 1: only visible to yourself, default is 0
image false string Address of the cover map. Note that the width height ratio of the cover map should be consistent with that of the live broadcast.
replay false string Record or not, 0: Do not record, 1: Record, default is 1
is_panolive false string Whether to broadcast panorama live, 0: No, 1: Yes, default is 0

Return to Example

 { "id": "230916c5fc9c48670bf72b9135261865ef35cd", "room_id": "1042097:5617ce1cc0f822ebd37f93a0275c8660", "url": " rtmp://ps.live.weibo.com/ ***/c5fc9c48670bf72b9135261865ef35cd? auth_key=***" }

Return Field Description

Parameter fields Field Type Field Description
id string Live ID
rtmp_url string Live streaming address
room_id string Room ID


Live streaming

The third party starts streaming according to the streaming address rtmp_url returned by the live broadcast creation interface


Update live broadcast

https://api.weibo.com/2/proxy/live/update

POST

Live broadcast object information, status and other updates

parameter

Parameter fields Field required Field Type Field Description
access_token true string The OAuth authorization method is a required parameter, which is obtained after OAuth authorization
id true string Live ID
title false string Live broadcast description
summary false string The content of microblog text must be URLencode, and the content should not exceed 130 Chinese characters
published false string Whether to publish Weibo, 0: publish publicly, 1: only visible to yourself, 2: not publish, default to 2
image false string Live cover map address
stop false string Live broadcast ends, 0: Live broadcast is in progress, 1: Live broadcast ends, default is 0
replay_url false string Live broadcast playback address

Return to Example

 { "id": "230916c5fc9c48670bf72b9135261865ef35cd" }

Return Field Description

Parameter fields Field Type Field Description
id string Live ID


Delete live broadcast

https://api.weibo.com/2/proxy/live/delete

POST

Live broadcast object deletion, irreversible

parameter

Parameter fields Field required Field Type Field Description
access_token true string The OAuth authorization method is a required parameter, which is obtained after OAuth authorization
id true string Live ID

Return to Example

 { "id": "230916c5fc9c48670bf72b9135261865ef35cd" }

Return Field Description

Parameter fields Field Type Field Description
id string Live ID


Get live broadcast information

https://api.weibo.com/2/proxy/live/show

POST

Access to live broadcast object information, interactive information, etc

parameter

Parameter fields Field required Field Type Field Description
access_token true string The OAuth authorization method is a required parameter, which is obtained after OAuth authorization
id true string Live ID
detail false string Live broadcast details, 0: no return, 1: return, default is 0

Return to Example

 { "id": "230912beaccf45a32ac3a36078b245ad8b5ddf", "uid": "2791445053", "Title": "Testing Live Broadcast Modification", "Summary": "Introduction to live test modification", "url": " http://live.weibo.com/show?id=1042097:beaccf45a32ac3a36078b245ad8b5ddf ", "status": 3, "create_time": "2016-10-20 16:40:29" }

Return Field Description

Parameter fields Field Type Field Description
id string Live ID
uid string Live author ID
title string Live title
summary string Microblog text content
image string Cover Map Address
url string Live landing page
status int Live broadcast status
create_time string Live broadcast creation time
live_views int Live broadcast real-time online population, return when the detail is 1
total_views int The total number of live broadcast online people will return when the detail is 1
total_stars int The total likes of the live broadcast are returned when the detail is 1


Live interactive interface


error code

Error return example

 { request : error_code : error : }

Error code field description

Error code Error msg describe
twenty thousand and one live create error Failed to create live broadcast
twenty thousand and two update weibo error Failed to tweet
twenty thousand and three post param loss The post parameter is missing
twenty thousand and four get param loss The get parameter is missing
twenty thousand and five live delete error Failed to delete live broadcast
twenty thousand and six live update error Failed to update live broadcast
twenty thousand and seven send message error Comment failed
twenty thousand and eight rsync message error Pull failed
twenty thousand and nine live id unexist Live broadcast ID does not exist
twenty thousand and ten weibo content more than 130 word There are more than 130 words in Weibo
twenty thousand and eleven msg content more than 100 word,or is null The comment exceeds 100 words or is empty
twenty thousand and twelve msg content type error Wrong text type of speech
twenty thousand and thirteen authority not allow Insufficient permissions (inconsistent appkey or uid)
twenty thousand and fourteen user not allow The uid does not meet the requirements (at present, Weibo Live only supports orange V certified users, media&government blue V certified users to activate the live broadcast function, and users beyond this range need to pass sesame authentication or manual authentication to broadcast live)




Document update time: 2017-09-21