how to obtain your own channel ID on youtube, using python and youtube API?
<p>I was wondering how you can obtain your own channel ID using youtube API, or printing a list of the specific channelIDs from your user, since you can have multiple channels on your own user.(im using client_secrets)</p>

<p>i've been watchin alot of the documentation for youtube, but aint finding anything relevant for just this.(maybe im wrong, hehe)</p>

<p>i was watching this:
<a href="http://stackoverflow.com/questions/13572657/how-to-retrieve-a-channel-id-from-a-channel-name-or-url">How to retrieve a channel id from a channel name or url</a></p>

<p>and that was for a search for every channel, but it should be an easier solution just for your own user.(tell me if im wrong)</p>

<p>and is the right path to go?:</p>

<pre><code>channels_list = youtube.channels().list(
    part="id",
    mine=True
  ).execute()
channelID = channel_list["items"]["id"]
</code></pre>

<p>im going to use the channelId to upload a specific video to the channel.
I hope someone can help! </p>

<p>Judging from <a href="https://developers.google.com/youtube/v3/docs/channels/list" rel="nofollow">the docs</a>, I'd say you're on the right track.</p>

<pre><code>channels_list = youtube.channels().list(mine=True)
</code></pre>

<p>Should return a list of your owned channels, if you're sending an authenticated <code>request</code>. </p>

<p>You can then simply access the list directly by calling</p>

<pre><code>channels_list['items']
</code></pre>

<p>Note that the <code>ChannelItem</code> is a dict within a list, so you'll have to access the channel item's <code>index</code>, and then the <code>key</code></p>

<pre><code>channels_list['items'][0]['items']['id'] 
</code></pre>

<p>If you'd like to get your channel ids in a single step, this might be what you're looking for:</p>

<pre><code>chan_ids = [chan['items']['id'] for chan in youtube.channels().list(mine=True)['items']]
</code></pre>

<p><a href="https://developers.google.com/youtube/v3/docs/channels" rel="nofollow">This section here</a> might be of help to you, as well.</p>

python api youtube user channel