youtube captions api example in go
Youtube captions api requires an authorization with "youtube.force-ssl" or "youtubepartner" scope. You need to get OAuth2 credentials from google: https://console.developers.google.com/apis/credentials
Here is a guide: Get API Key for YouTube, for captions api, get an OAuth2 client instead of an api key.
Put the oauth2 client file named "client_secret.json" in your directory.On the first run, follow the prompt to get a token.