Search code examples
youtube-apiyoutube-javascript-apiyoutube-data-apiandroid-youtube-apiyoutube-channels

How to setup login to youtube with data api using JS


I can't find any documentation on youtube developers page for creating a form on login to youtube account or google.

It's okay if there is an embed frame for that login. I just need a guide, I'll do the coding.


Solution

  • https://developers.google.com/youtube/v3/code_samples/javascript#authorizing_requests

    It gives you the code for 4 files (Each of which would be needed) that creates an HTML form which, when a user clicks a button, offers the oAuth2 authorization page ... and, once that is clicked on, redirects back to the app but hides the login button in favor of a little upload widget. It should help you see the general flow, and then you can tailor it to your own needs.