Page Summary
-
A
liveChatBanresource identifies a YouTube user who is banned from a specific YouTube live chat. -
The API allows channel owners or moderators to insert a
liveChatBanto ban a user or delete one to remove the ban. -
A
liveChatBancan be either permanent or temporary, and the duration of a temporary ban can be specified in seconds. -
The
liveChatBanresource'ssnippetobject includes the ID of the live chat, the type of ban, the ban duration (if temporary), and details of the banned user. -
The
liveChatBanresource has properties such askind,etag, andid, which provide general information about the resource, such as the resource type, its ETag, and the ban's unique ID.
A liveChatBan
resource identifies a YouTube user and a YouTube live chat that the user is banned from participating in.
Methods
The API supports the following methods for liveChatBans
resources:
- insert
- Bans a specific user from participating in the live chat. The API request must be authorized by the channel owner or a moderator of the live chat associated with the ban. Try it now .
- delete
- Removes a ban that prevents a specific user from contributing to a live chat, thereby enabling the user to rejoin the chat. The API request must be authorized by the channel owner or a moderator of the live chat associated with the ban. Try it now .
Resource representation
The following JSON structure shows the format of a liveChatBans
resource:
{ " kind " : "youtube#liveChatBan" , " etag " : etag , " id " : string , " snippet " : { " liveChatId " : string , " type " : string , " banDurationSeconds " : unsigned long , " bannedUserDetails " : { " channelId " : string } } }
Properties
The following table defines the properties that appear in this resource:
kind
string
Identifies the API resource's type. The value will be
youtube#liveChatBan
.etag
etag
The Etag of this resource.
id
string
The ID that YouTube assigns to uniquely identify the ban.
snippet
object
The
snippet
object identifies the banned user and contains details about the ban. snippet.
liveChatId
string
The live chat to which the ban applies. The live chat ID associated with a broadcast is returned in the
liveBroadcast
resource's snippet.liveChatId
property. snippet.
type
string
The type of ban.
Valid values for this property are:
-
permanent -
temporary
snippet.
banDurationSeconds
unsigned long
The duration of the ban. Only set a value for this property if the ban's type is
temporary
. The default value is 300
(5 minutes). snippet.
bannedUserDetails
object
This object contains information that identifies the banned user.
snippet.bannedUserDetails.
channelId
string
The banned user's YouTube channel ID.

