Search code examples
oauthgoogle-apiyoutube-apigoogle-oauthyoutube-data-api

Why does download captions return Login Required?


I tried show captions in the video via URL but It's tell me login required

My attempt

https://www.googleapis.com/youtube/v3/captions/BoaAKQZq5TEG3wdKFklJrnQZ3_7OayFqRJtSUDTo9Ck=?tfmt=ttml&tlang=en&key=I_Hid_My_Key

The result is Login Required

The source

Captions: download


Solution

  • What you need to understand is the diffidence between private and public user data. Public data is just that public anyone can access it. Youtube Video search for example searches for public youtube videos.

    Videos captions download Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter.

    This data is private data. It can only be accessed by the captions on a video with the permission and Authorization of the owner of the video.. In you are currently using an api key denoted by key= which is only used for accessing public data. You will need to be authenticated using one of the below scopes in order to access this information.

    This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

    Scope