YouTube API returns 403 error about disabled video comments when using channel ID parameter

I’m trying to fetch comment threads from YouTube API but getting a weird error. When I make this request:

curl --location 'https://youtube.googleapis.com/v3/commentThreads?part=snippet%2Creplies%2Cid&allThreadsRelatedToChannelId=MY_CHANNEL_ID&maxResults=50' \
--header 'Authorization: Bearer MY_ACCESS_TOKEN' \
--header 'Content-Type: application/json'

The API throws this error:

{
  "error": {
    "code": 403,
    "message": "The video identified by the videoId parameter has disabled comments.",
    "errors": [
      {
        "message": "The video identified by the videoId parameter has disabled comments.",
        "domain": "youtube.commentThread",
        "reason": "commentsDisabled",
        "location": "videoId",
        "locationType": "parameter"
      }
    ]
  }
}

This doesn’t make sense to me because I’m using the channel ID parameter, not video ID. Why is it complaining about video comments being disabled? I thought it would just skip videos with disabled comments and return the rest. What could be causing this issue?

Had the exact same issue last month! The allThreadsRelatedToChannelId completely breaks when it hits a video with disabled comments - just fails entirely. It’s documented, but the API docs barely explain it. Here’s what fixed it for me: use a two-step approach. First, hit the search endpoint to grab your channel’s videos. Then use the videos endpoint with part=statistics to check if comments are enabled before trying to fetch them. Videos with disabled comments show commentCount as 0, or you can dig deeper into the video details. Alternatively, try using the channelId parameter in commentThreads instead of allThreadsRelatedToChannelId. Sometimes it behaves better, though results depend on your channel setup.

Ugh, YouTube API bug strikes again. Switch to the channelId parameter instead of allThreadsRelatedToChannelId - it’s more reliable. Also double-check your OAuth scopes. You need youtube.force-ssl for comment access.

Hit this same annoying issue six months ago building a comment analytics tool. YouTube’s API craps out when a channel has mixed comment policies and you’re using allThreadsRelatedToChannelId. Instead of skipping problem videos, it just throws a 403 and dies completely. Here’s what fixed it for me: use pagination with smaller batches and wrap each request in try-catch blocks. When you get a 403, log it and move on to the next batch. Also check the video’s snippet.liveBroadcastContent field first - live streams usually have weird comment behavior that triggers this error. The API’s error handling is genuinely terrible here, but these workarounds keep your scraping running.

This happens because the YouTube API tries to grab comments from all your channel’s videos at once. If even one video has comments disabled, the whole request crashes. The API can’t handle channels with mixed comment settings - some videos allow comments, others don’t.

I’ve hit this same problem before. Here’s the fix: use the videos endpoint first to get your video list, then filter out videos with disabled comments. After that, make separate commentThreads requests for each video using the videoId parameter instead of querying the entire channel. Yeah, it’s more API calls, but it stops the complete failure you’re seeing.

definitely a pain! yeah, the API tends to be picky. best strategy is to get ur video list first, then ignore the ones with comments off. saves some headache later when fetching comments.