2
votes

I am working on a project that uses auto-generated captions as input. I have never used the YouTube API before so I decided to try out the features I want on the "Google API Explorer" first, to make sure they work how I think they will.

When I try to download the auto-generated captions from my test video, I keep getting 403. Here's what I did:

  1. The test video id: dhC-7vSlJEY (Note: This is another users' video, not my upload)

  2. From this I used youtube.captions.list to get the caption ID:

    "id": "HgeLH1Y19gKUOyo3qFc50_PkvRsXiln7RRrUk2uuFLM="

  3. Then I run it through captions.download and it asks me for OAuth. The documentation says this requires the following scopes:

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

Which I selected in the pop-up tool.

  1. Then it returns this:

403

  • Hide headers -

cache-control: private, max-age=0 content-encoding: gzip content-length: 161 content-type: text/html; charset=UTF-8 date: Fri, 30 Jun 2017 20:50:42 GMT expires: Fri, 30 Jun 2017 20:50:42 GMT server: GSE vary: Origin, X-Origin

The permissions associated with the request are not sufficient to download the caption track. The request might not be properly authorized, or the video order might not have enabled third-party contributions for this caption.

So what's going on?

Am I missing some OAuth scope?

Do auto-generated captions have different permissions than user-uploaded captions?

1
What's your code?user6250760
the video order might not have enabled third-party contributions for this caption.. I think this is it. When you go to youtube, click on subtitle, there is no "add subtitle" entry. Try this videoId pubscGlTutI which user has authorized 3rd part contributions linkBertrand Martel

1 Answers

0
votes

Based from this thread, the captions.download endpoint only works for videos your google account owns. It is not usable for other videos unless the owner of the video enables third party contribution for the caption. You may also check this related thread: Downloading captions using Youtube v3 API