AI-generated Key Takeaways
- 
          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:
| Properties | |
|---|---|
| kind | stringIdentifies the API resource's type. The value will be youtube#liveChatBan. | 
| etag | etagThe Etag of this resource. | 
| id | stringThe ID that YouTube assigns to uniquely identify the ban. | 
| snippet | objectThe snippetobject identifies the banned user and contains details about the ban. | 
| snippet.liveChatId | stringThe live chat to which the ban applies. The live chat ID associated with a broadcast is returned in the liveBroadcastresource'ssnippet.liveChatIdproperty. | 
| snippet.type | stringThe type of ban. Valid values for this property are: 
 | 
| snippet.banDurationSeconds | unsigned longThe duration of the ban. Only set a value for this property if the ban's type is temporary. The default value is300(5 minutes). | 
| snippet.bannedUserDetails | objectThis object contains information that identifies the banned user. | 
| snippet.bannedUserDetails.channelId | stringThe banned user's YouTube channel ID. |