Method: channelSections.list

Returns a list of channelSection resources that match the API request criteria.

Requests that use the channelId or id filter don't require OAuth 2.0 authorization for public channels. Requests that use mine=true or onBehalfOfContentOwner require authorization. For method-specific error responses, see channelSections.list errors. For code examples, see channelSections.list code snippets.

HTTP request

GET https://youtube.googleapis.com/youtube/v3/channelSections

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
id[]

string

Specifies a comma-separated list of IDs that uniquely identify the channelSection resources to retrieve (up to 50 IDs by default). Specify exactly one filter parameter (channelId, id, or mine). Requests that specify id don't require OAuth 2.0 authorization for public channels.

mine

boolean

Set this parameter's value to true to retrieve a feed of the channel sections associated with the authenticated user's YouTube channel. Requires OAuth 2.0 authorization and can't be combined with onBehalfOfContentOwner. Specify exactly one filter parameter (channelId, id, or mine).

channelId

string

Specifies a YouTube channel ID to retrieve only that channel's sections. Specify exactly one filter parameter (channelId, id, or mine). Requests that specify channelId don't require OAuth 2.0 authorization for public channels.

hl
(deprecated)

string

Deprecated: Previously supported retrieving localized metadata for a channel section, which is no longer supported in YouTube Studio or the YouTube app. When set, the API still validates the value as a supported language code but ignores it when building the response.

part[]

string

Required. Specifies a comma-separated list of one or more channelSection resource properties that the API response includes.

If the parameter identifies a property that contains child properties, the child properties are included in the response. For example, in a channelSection resource, the snippet property contains properties such as a display title for the section. Setting part=snippet returns all of those nested properties.

Valid values are contentDetails, id, and snippet.

onBehalfOfContentOwner

string

This parameter can only be used in a properly authorized request, and 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. This parameter can't be combined with mine=true.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "kind": string,
  "etag": string,
  "items": [
    {
      object (ChannelSection)
    }
  ]
}
Fields
kind

string

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

etag

string

Etag of this resource.

items[]

object (ChannelSection)

A list of channel sections that match the request criteria.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtubepartner
  • https://www.googleapis.com/auth/youtube.readonly
  • https://www.googleapis.com/auth/youtube.force-ssl

For more information, see the OAuth 2.0 Overview.