# Application for Live Streaming
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
applyLivelnfo
# Functional description
Through this interface, third-party developers can help merchants launch applications for Mini Program live broadcasting functions. If you encounter problems during use, you canOpen Platform Service Provider ZonePosting exchanges.
# Note
# Calling frequency
- 100 times/One day
# Service Provider Use Process
1, the service provider to obtain the business Mini Program live permission authorization (permission set ID: 52), authorization process referenceAuthorization Process Technical Notes。
2, service providers call interface [live function application api] to help businesses initiate Mini Program live permission application.
- The platform sends a template message to the mini program management WeChat. The manager must be 24. Click on the message within hours to confirm and agree to the "WeChat Mini Program Live Broadcast Function Terms of Service"
4, after the merchant confirms the successful opening, the relevant notification will be received through the message and event. URL Push to the service provider.
5, after the opening of the live broadcast, service providers can call other live broadcast interface for live broadcast management, details can be viewed "Mini Program document center - server-live" interface document
# Business Use Process
1, after the service provider calls the interface, the Mini Program administrator will receive the template message pushed by the [public platform security assistant] service number.
2, within 24 hours, click the message card to enter the function opening page, read and agree to the "WeChat Mini Program Live Broadcast Function Terms of Service," and submit the function application. If the function application is not performed within the timeout, the application will be invalid.
- The application results will be fed back in real time after the application is submitted.
# Calling mode
# HTTPS call
POST https://api.weixin.qq.com/wxa/business/applyliveinfo?access_token=ACCESS_TOKEN
# Third Party Invocation
The calling method and parameters are the same as HTTPS, only the calling token is different
The permission set id to which this interface belongs is: 52
After the service provider has been authorized with one of the permission sets, it can do so by usingauthorizer_access_TokenCalling on behalf of the merchant
# Request parameters
attribute | type | Required | Introductions |
---|---|---|---|
access_Token | string | yes | Interface invokes the certificate, which is URL Parameters, non Body Parameters. useauthorizer_access_Token |
action | string | yes | Fill in: "apply" |
# Return parameters
attribute | type | Introductions |
---|---|---|
errcode | number | 0 represents the application has been accepted, waiting for the Mini Program administrator operation2 said that the Mini Program has not paid for nearly 90 days, and cannot apply for the opening of live broadcast capabilities. (Data effective time is T + 1, please be patient) |
errmsg | string | Error message |
action | string | "apply" |
# Other Notes
# Result Push Example
Open results receive messages and events URL Push relevant notifications.
Example of Data
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>timestamp</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[wxa_live_apply_event]]></Event>
<ApplyLiveInfoNoitfy>
<appid>![CDATA[Successfully opened appid]]</appid>
<open_time>![CDATA[Time for successful opening]]</open_time>
</ApplyLiveInfoNoitfy>
</xml>
# Call Example
Example Dxplaination: HTTPS requests
# Sample Request Data
{
"action": "apply"
}
# Return Data Example
{
"errcode": 0,
"errmsg":"ok",
"action":"apply"
}
# Error code
Error code | Error code | Solutions |
---|---|---|
-1 | system error | The system is busy, please wait for the developer to try again |
2 | The Mini Program has not paid for nearly 90 days and cannot apply for the opening of live broadcasting capabilities. (Data effective time is T + 1, please be patient) |