LiveBroadcasts: control

Note: The liveBroadcasts.control method has been deprecated and will stop working on or after 1 October 2020. After that date, all calls to this method will return a forbidden (403) error, and the method will later be completely removed.

Clients can still implement their own slating by adding an overlay to the video sent to YouTube’s ingestion servers. See deprecation announcement.

Controls the settings for a slate that can be displayed in the broadcast stream.

Common use cases

Request

HTTP request

POST https://www.googleapis.com/youtube/v3/liveBroadcasts/control

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/youtube
https://www.googleapis.com/auth/youtube.force-ssl

Parameters

The following table lists the parameters that this query supports. All of the parameters listed are query parameters.

Parameters
Required parameters
id string
The id parameter specifies the YouTube live broadcast ID that uniquely identifies the broadcast in which the slate is being updated.
part string
The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.
Optional parameters
displaySlate boolean
The displaySlate parameter specifies whether the slate is being enabled or disabled.
offsetTimeMs unsigned long
The offsetTimeMs parameter specifies a positive time offset when the specified slate change will occur. The value is measured in milliseconds from the beginning of the broadcast's monitor stream, which is the time that the testing phase for the broadcast began. Even though it is specified in milliseconds, the value is actually an approximation, and YouTube completes the requested action as closely as possible to that time.

If you do not specify a value for this parameter, then YouTube performs the action as soon as possible. See the Getting started guide for more details.

Important: You should only specify a value for this parameter if your broadcast stream is delayed.
onBehalfOfContentOwner string
This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.

The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
onBehalfOfContentOwnerChannel string
This parameter can only be used in a properly authorized request. This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.

The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.

This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.
walltime datetime
The walltime parameter specifies the wall clock time at which the specified slate change will occur. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.

Request body

Do not provide a request body when calling this method.

Response

If successful, this method returns a liveBroadcast resource in the response body.

Errors

The following table identifies error messages that the API could return in response to a call to this method. Please see the error message documentation for more detail.

Error type Error detail Description
backendError errorDisplaySlate An error occurred when executing the requested action.
forbidden (403) liveBroadcastControlNotAllowed The requested action is only allowed if the broadcast's status is live.
insufficientPermissions insufficientLivePermissions The user is not authorized to for the requested operation, possibly because the user does not have permission to stream live.
insufficientPermissions liveStreamingNotEnabled The user that authorized the request is not enabled to stream live video on YouTube. The user can find more information at https://www.youtube.com/features.
invalidValue (400) conflictingTimeFields Only one of offsetTimeMs and walltime may be specified.
invalidValue (400) invalidOffsetTimeMs The offsetTimeMs parameter's value is invalid. The parameter value must be positive, but the parameter can only be specified if the broadcast's monitor stream is enabled.
invalidValue (400) invalidWalltime The walltime parameter's value is invalid.
notFound (404) liveBroadcastNotFound The broadcast specified by the id parameter does not exist.
required (400) actionRequired The API request needs to specify at least one action. At this time, the only supported action is the ability to enable or disable the slate.
required (400) idRequired The required id parameter must identify the broadcast that is being updated.

Try it!

Use the APIs Explorer to call this API and see the API request and response.