Caching server for YouTube API requests made for usage with the YTBSP-userscript.
- "/authUrl":
GetGoogle authentication url for googles OAuth2 authentication process. - "/oauth2callback":
Getcallback for authentication with google redirected by Google API. - "/subscriptions":
Getsubscription resources that match the API request criteria.
https://developers.google.com/youtube/v3/docs/subscriptions/list - "/playlistItems":
Geta cached collection of playlist items that match the API request parameters.
https://developers.google.com/youtube/v3/docs/playlistItems/list - "/videos":
Geta cached list of videos that match the API request parameters.
https://developers.google.com/youtube/v3/docs/videos/list - "/settings":
GetorPostuser settings as json (stored in MongoDB). - "/videoStates":
GetorPostuser video information as json (stored in MongoDB).
- Install node (with NPM >= 10)
- Install mongoDB on the host computer or set up a remote mongoDB
- Run
npm installin the project directory. - configure your settings:
- Copy the
settings.example.jsonand rename it tosettings.json - Open
settings.jsonand replace the dummy values with your actual credentials.
For"web"use the credentials downloaded (see API client section).
Leave"db"empty if using mongoDB on localhost else fill the three fields. - If you want to locate the
settings.jsonnot in the project root directory you can change the path using the"settings_path"environment variable or the"settings_path=..."command line argument. - The settings file can also be fetched using the
"settings_url"environment variable or the"settings_url=..."command line argument.
- Copy the
- Run
npm run startin the project directory. - Enjoy your server!
This server depends on a Google API project and the Youtube v3 API.
To start a project and enable the API please read the reference:
https://developers.google.com/youtube/v3/getting-started
After your project is set up you can download the credentials JSON file from:
https://console.cloud.google.com/apis/credentials

Works great with heroku (free*).
The settings and credentials can be set via heroku environment variables.
We recommend to host the DB on an external server like MongoDB Cloud (free*).
* Services have free and paid plans.