- Free
- Open Sourced
- Secured
- Cool
- Easy to Deploy
Read steps carefully ๐
- Open GCP Create a Project & Go To it's APIs & Services .
- Press Library & Search Youtube data api.
- You will see YouTube Data API v3 , enable that.
- Go To APIs & Services again.
- Press OAuth consent screen.
- Make it External & hit create button.
- Just give a Application Name and hit Save.
- Press crediantials in left menu.
- Press Create Crediantials & OAuth client ID.
- Select Web Application.
- (Optional) Change the Name.
- In Authorized redirect URIs hit โ ADD URI.
- The URI is https://authcode.netlify.app (Don't Change IT).
- You will get a Client ID & Client Secret.
Hard part is done now deploy it ๐ช
- Need a VPS (Not tested in Heroku).
- Clone the repo.
git clone https://github.com/cachecleanerjeet/realtime-video-statistics-in-video-s-title.git
- Goto the directory.
cd realtime-video-statistics-in-video-s-title
- Install the Dependencies.
npm install
- Open settings.js & add your clientSecret , clientId & videoID.
- Open index.js & go to line 62 & 64 and customize title and description.
- Run token.js to configure token.
node token.js
- It will give you a url open that and select your youtube account.
- After give access you will redirect to https://authcode.netlify.app here copy the code and paste it on terminal.
- Now you will see there is a file called .credentials created & contains a topsecret.json.
- Whenever you newly generate the token you have to remove .credentials directory.
- Now run the code.
node index.js
- To run it after shell closed.
npm install forever -g
forever start index.js
Now your video's Title & Description will update in every 2 minutes.
- Don't ever Public your topsecret.json, clientSecret & clientId. Otherwise your YouTube account will compromised.
What is https://authcode.netlify.app ?
- OAuth needs a redirect uri.
- That redirect uri contains the authorization code.
- That website just display the code to you from url.
- The website's source code available Here.
My Website & Social