Test Youtube API NodeJS module
This is an example application how to use the youtube-api
library and explore the YouTube API resources.
-
You need a Google Account to access the Google APIs Console, request an API key, and register your application.
-
Register your application with Google so that it can submit API requests:
-
After registering your application, select YouTube Data API as one of the services that your application uses.
- Go to the APIs Console and select the project that you just registered.
- Click on APIs & auth on the left side. Then a dropdown will be opened.
- Select APIs.
- Search for YouTube Data API v3, click it and click Enable API
-
Download this repository by running:
git clone http://github.com/IonicaBizau/test-youtube-api
-
Enter in the downloaded directory and run
npm install
:cd test-youtube-api npm install
-
Go back in your Google app and click again on APIs & auth and then select Credentials.
-
Click Create new Client ID. This will create new OAuth 2.0 credentials:
-
Select Web application
-
Click Configure consent screen
-
Complete the required fields:
- Product name: what ever you want (e.g. "Youtube API Test")
- Product logo is optional
- Home page is optional
- Save the changes
-
Now you will have to set the auth urls. This test application uses the following urls:
- Authorized JavaScript origins:
http://localhost:5000/
(paste it in the first textarea) - Authorized redirect URIs:
http://localhost:5000/oauth2callback
(paste it in the second textarea)
- Authorized JavaScript origins:
-
Finally, click Create Client ID
-
OK, at this step you have the credentials (in your Google app). Now you have to use them in this test application:
- Rename
credentials.templ.json
intocredentials.json
. - Open
credentials.json
and replaceyourClientId
with the client id andyourSecretKey
with client secret generated previously. - Now you are ready. Start the script (
npm start
) and openhttp://localhost:5000
.
There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues. ๐
- For direct and quick help, you can use Codementor. ๐
Have an idea? Found a bug? See how to contribute.
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
-
Starring and sharing the projects you like ๐
-
โI love books! I will remember you after years if you buy me one. ๐ ๐
-
โYou can make one-time donations via PayPal. I'll probably buy a
coffeetea. ๐ต -
โSet up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
-
BitcoinโYou can send me bitcoins at this address (or scanning the code below):
1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6
Thanks! โค๏ธ