Getting YouTube channel profile picture with channelId

前端 未结 3 1056
自闭症患者
自闭症患者 2021-02-05 21:33

So I\'m trying to get the channel profile picture for a YouTube channel by using the channelId.

I would like to do it simply by adding the channelId to a URL and get the

3条回答
  •  自闭症患者
    2021-02-05 22:17

    You can use channels->list request for that.

    In response you will get snippet.thumbnails."default".url for that

    For authenticated user's channel:

    GET https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true&fields=items%2Fsnippet%2Fthumbnails&key={YOUR_API_KEY}
    

    Or for any channel ID:

    GET https://www.googleapis.com/youtube/v3/channels?part=snippet&id+CHANNEL_ID&fields=items%2Fsnippet%2Fthumbnails&key={YOUR_API_KEY}
    

提交回复
热议问题