1

Could you please help me if I can receive the captions from any YouTube video with captions? And, if yes, how I can do this?

I'm using this request to get the caption id - https://www.googleapis.com/youtube/v3/captions?part=id,snippet&videoId=id.

After this, I sent this request https://www.googleapis.com/youtube/v3/captions/captionId

I've added the next scopes: 'https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtubepartner'.

But as a result, I received a 403 error:

{
    "error": {
        "code": 403,
        "message": "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.",
        "errors": [
            {
                "message": "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.",
                "domain": "youtube.caption",
                "reason": "forbidden",
                "location": "id",
                "locationType": "parameter"
            }
        ]
    }
}
Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
Natali S.
  • 11
  • 2
  • See [this Stack Overflow comment](https://stackoverflow.com/questions/30653865/downloading-captions-always-returns-a-403#comment49414961_30660549), I approve this comment. Use [`yt-dlp`](https://github.com/yt-dlp/yt-dlp) to download captions without using YouTube Data API v3. – Benjamin Loison Mar 01 '23 at 18:48

0 Answers0