How to get Channel ID (YouTube API v2)?

2019-08-27 16:00发布

If i know author or Channel ID then link is worked but i need get my channel ID.

https://gdata.youtube.com/feeds/api/videos?author=[Channel ID]&orderby=viewCount

But i don't have a channel ID. I want using my Google account (My username and password) and get my channel ID using v2 Google Gdata Youtube API, not v3

Thanks for help.

Astin Runa

2条回答
smile是对你的礼貌
2楼-- · 2019-08-27 16:18

You can try with the channels endpoint passing the part as id, forUsername and key https://www.googleapis.com/youtube/v3/channels?part=id&forUsername=YOUR_USERNAME&key=YOUR_KEY

Edited:

For v2:

http://gdata.youtube.com/feeds/api/users/frangarcia?v=2&alt=json and you will the channelId at json.entry.yt$channelId.$t

查看更多
Viruses.
3楼-- · 2019-08-27 16:18

To get a YouTube channels [User ID] or [Channel ID], you simply need to navigate to the channels home page and look at the navigation bar of your browser and look for either:

  1. "/channel/" or "/user/"
  2. The text that follows and ends with the next "/" copy that text without the "/" and you have your Channels or Users ID.

Thanks for the Channel ID code and in case you don’t have the User ID code.

User ID Code: http://www.youtube.com/rss/user/[User_ID]/feed.rss which will translate in your browser to the relevant code, that is required to work. Unfortunately I can't seem to find any such code that work the same for channels with only Channel ID displaying and not the User ID which would have been great.

Check out Derral Eves "How to Find the RSS Feed for Your Youtube Channel": https://www.youtube.com/watch?v=DevXRvPa3dU, for a visual demonstration on how to find the youtube channels RSS Feed for a [User ID] and is where I found my information.

Terry

查看更多
登录 后发表回答