YouTube API Watch Private Videos

后端 未结 3 843
刺人心
刺人心 2021-02-06 11:15

I have a website that has a draft mode. Someone can login and see what the site looks like to approve it before the public can see it. I have YouTube videos on an account that I

3条回答
  •  无人及你
    2021-02-06 11:42

    First of all, you can't retrieve the video itself via the api.
    All you'll get is an link to embed or redirect your user.

    So ultimately, your user will watch the video himself, without you as the man in the middle. Therefore you will be looking for something like password protection of your video.
    A quick google search brought up this.

    You can change the broadcast privacy option to private. Then your "specific users" will need YouTube accounts and will need to "friend" you (or vice versa). You then edit the broadcast privacy option of the video to add the friends (up to 25) to the video. They will automatically be sent a "shared with you message". They sign into their YouTube account and they are able to watch the video.

    When authenticating with the user who uploaded the video in the API you should be able to retrieve those private videos too (see Developers Guide: Retrieving Uploades).

    Disclaimer: I don't do youtube api def, I couldn't test it.

提交回复
热议问题