Video live broadcast open interface


Live broadcast service OPEN API


Read the following documents to help understand how to use the Weibo live broadcast interface.

Authorization mechanism

Currently, Weibo open platform uses Oauth2.0 for user identity authentication. Please refer to How to Login for Authorization

Access frequency limit

Access level: Common interface

Frequency limit: Yes

Regarding frequency limits, please refer to the interface access permission description

Create live broadcast

URL: https://api.weibo.com/2/proxy/live/create [POST ]

Instructions: Create a new live broadcast object, obtain the live push address, and post on Weibo at the same time

Parameters:

QQ截图20170209170259.png

Return:

QQ截图20170209170312.png

Example:

Live streaming

The third party starts streaming based on the push address rtmp_url returned by the live broadcast creation interface


Update live broadcast

URL: https://api.weibo.com/2/proxy/live/update [POST]

Description: Live broadcast object Information, status, etc. updates

Parameters:

QQ截图20170209170337.png

Return:

QQ截图20170209170357.png

Example:

QQ截图20170209170410.png

Delete live broadcast

URL: https://api.weibo.com/ 2/proxy/live/delete [POST]

Description: Live object deletion, irreversible

Parameters:

QQ截图20170209170428.png

##Return:

QQ截图20170209170439.png

Example:

##1
2
3
4
5
##{
"id": "230916c5fc9c48670bf72b9135261865ef35cd",
"room_id": "1042097:5617ce1cc0f822ebd37f93a0275c8660",##​
"url": "rtmp://ps.live.weibo.com/***/c5fc9c48670bf72b9135261865ef35cd?auth_key=***"}
##1

Get live broadcast information

URL: https://api.weibo.com/2/proxy/live/show [POST]

Description: Obtain live broadcast object information, interaction information, etc.

Parameters:

QQ截图20170209170457.png

Return:

QQ截图20170209170510.png

Example:

2
3
##{
"id" : "230916c5fc9c48670bf72b9135261865ef35cd"}
##1
2
3
4
5
6
7
8
9
{
"id": "230912beaccf45a32ac3a36078b245ad8b5ddf",
"uid": "2791445053",
    "title": "Test live broadcast modification",
"summary": "Introduction to test live broadcast modification",
##​
"url": "http://live.weibo.com/show?id=1042097:beaccf45a32ac3a36078b245ad8b5ddf",
"status": 3,
    "create_time": "2016-10-20 16:40:29"
}

Upload image

URL: https ://api.weibo.com/statuses/upload_pic.json[POST]

Description: Upload picture interface


Do you need to log in

true For the login authorization method, please refer to how to log in and authorize in this WIKI


Request parameters

QQ截图20170209170525.png

Return result

//Return successfully



//Failure returns


##1
2
3
4
5
6
7
{
"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"}
##1
2
3
4
5
##{
"request": "/2/statuses/upload_pic.json",
"error_code": "201XX",
   
"error": "error message."
}
Live interactive interface

Please refer to the live interactive interface document

Error code

Error code

QQ截图20170209170543.pngExample:

1
2
3
4
5
{
request :
error_code :
error :
}