NodeJS Youtube Upload Test
Test application that tests Youtube Upload API NodeJS module. This is a modification of the test-youtube-api repository, and also uses the node-youtube-resumable-upload npm package.
Before you start
-
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 the 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 the Services pane.
- In the list of APIs, find the YouTube Data API and change its status to ON.
- Familiarize yourself with the core concepts of the JSON (JavaScript Object Notation) data format. JSON is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see json.org.
Installation
- Download this repository using:
git clone http://github.com/jaredwilli/node-youtube-upload
- Enter in the downloaded directory and run
npm install
:
cd node-youtube-upload
npm install
-
Go to your Google apps and select your application.
-
Select
API Access
option, like in the screen shot:
- Then create an OAuth 2.0 client ID.
- Complete the required fields:
- Product name: what ever you want (e.g. "Youtube API Test")
- Product logo is optional
- Home page is optional
- Click Next button.
- Select Web application option.
- Set the site or hostname as
localhost:5000
, so the redirect uri will be:http://localhost:5000/oauth2callback
- Click Create client ID button.
- Rename
credentials.templ.json
intocredentials.json
. - Open
credentials.json
and replaceyourClientId
with the client id andyourSecretKey
with client secret generated in the step 10. - Now you are ready. Start the script and open
http://localhost:5000
.
node index.js
Then open localhost:5000
in your browser and start testing the module.