To run the script, install NodeJS and NPM on your system. Install all the required packages by running:
npm install
Then run the script using the following command:
node script.js <google_api_access_token> <youtube_playlist_id>
To generate the google_api_access_token, go to the Google API Credentials page and generate an access key.
Note: The youtube_playlist_id is not the URL of the playlist. If the url of a playlist is https://www.youtube.com/playlist?list=PLkt3DFCNIchE9iqT1vmgTnBhUeKI4Thdr
then only the part after list=
is the playlist_id.
In the case of the URL mentioned above, the playlist ID would be PLkt3DFCNIchE9iqT1vmgTnBhUeKI4Thdr
.
For example, if your Google Access Token is abcd and your playlist ID is xyz, then the command you would run would be:
node script.js abcd xyz