Configuring YouTube
To integrate with YouTube you need to have a Google OAuth 2.0 credentials from the Google API Console.
Once logged in, click on Create project.
After that, click on Create Credentials and select "OAuth client ID".
First of all, you have to enable YouTube API in Enabled APIs page.
Click ENABLE APIS AND SERVICES button, then search for "YouTube Data API v3". Make sure this API is enabled.


And then, click on OAuth consent screen to configure consent screen.
Select User Type and click on CREATE.
Set App name then enter develper contact email.


After setting App name and developer contract email, click continue and click ADD OR REMOVE SCOPES to add required scopes.
Add following Scopes.
Then set Test Users and click Continue.
Go to Credentials and click on Create credential and OAuth client ID again. , click on Create Credentials and select "OAuth client ID".
For Application Type select "Web application".
Pick any name you want, something descriptive is always good eg. "MusicAPI Login".
Make sure Redirect URI is correct. It should be exactly:
After creating app, or if you already have existing app go to Settings to copy Client ID and Client Secret

We need these details to authenticate your users in your company's name.
To open YouTube authorization you can either redirect user to:
which will open YouTube authentication flow.
Or you can just point your users to:
where they will be able to select which music service they want to login with.