REST Resource: liveChatBans

Resource: LiveChatBan

A liveChatBan resource identifies a YouTube user and a YouTube live chat that the user is banned from participating in.

JSON representation
{
  "kind": string,
  "etag": string,
  "id": string,
  "snippet": {
    "liveChatId": string,
    "type": enum,
    "banDurationSeconds": string,
    "bannedUserDetails": {
      "channelId": string,
      "channelUrl": string,
      "displayName": string,
      "profileImageUrl": string
    }
  }
}
Fields
kind

string

Output only. Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatBan".

etag

string

Output only. Etag of this resource.

id

string

Output only. The ID that YouTube assigns to uniquely identify the ban.

snippet

object

Required. The snippet object identifies the banned user and contains details about the ban.

snippet.liveChatId

string

Required. Input only. 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

enum

Required. The type of ban.

Valid values of this enum field are:

  • permanent
  • temporary
snippet.banDurationSeconds

string

Optional. Input only. The duration of the ban, in seconds. Set a value for this property only if the ban's type is temporary; the property is ignored for permanent bans. Acceptable values are up to 86400 (24 hours). The default value is 300 (5 minutes).

snippet.bannedUserDetails

object

Required. Identifies the banned user. In liveChatBans.insert requests, set only channelId; the API populates channelUrl, displayName, and profileImageUrl in the response.

snippet.bannedUserDetails.channelId

string

The YouTube channel ID.

snippet.bannedUserDetails.channelUrl

string

The channel's URL.

snippet.bannedUserDetails.displayName

string

The channel's display name.

snippet.bannedUserDetails.profileImageUrl

string

The channel's avatar URL.

Methods

delete

Removes a permanent ban that prevents a specific user from contributing to a live chat, enabling the user to rejoin the chat.

insert

Bans a specific user from participating in a live chat.