Using Youtube Data API we can access YouTube features to our application, including the ability to upload videos, create and manage playlists, and more.
As a Developer, we need to handle third party API or custom own API. There is no developer who is not integrated any single API in her development journey. So let me introduce API with you. What is actually API is. API is basically Application Programming Interfaces.
🔰 Bit of information about API
If I make it simple then it's a common guideline, which way two software can talk to each other. Let’s break,
-📗 Application:- is a service app or could be a third-party open data portal. (Eg. Youtube, Google Map, etc)
-📗 Interface:- It's like a medium, which has some common definitions or formats. (Eg. JSON, XML or Other light-weight file format). JSON is a common and widely used format.
-📗 And finally, Program:- is a set of codes that the developer writes to develop the application. (Eg. Youtube Data API Codes)
I hope you guys get an idea about API if you want to know more about it. Then look below references.
🔰 Setting up your API-Key or Pre-configuration.
As I mentioned two systems talk to each other. So one issue raises, that is Security! so that we can take over the control of application resources. API's could be open or close via API-key. We need to configure API-key for close application resources. Okay, let's setup api-key for Youtube Data API.
🔰 Setup Youtube Data API Congifuraiton
- Visit, and Enable Youtube Data API
- If not exist then Create New Project
- Search For API Youtube Data API, Enable It.
- Then Left Menu Click Credentials.
- Create API Keys, Select none then Restrict key radio and choose Youtube Data API from Dropdown.
- Replace js/YoutubeDataApi.js file CLIENT_KEY and API_KEY.
- Now run the app using live server or deploy its production server. [I used VScode life server Extension]
Note: Origins must me match as defined as OAuth2.0 client console.
Details guide will be found. Guide. Else Occurre authentication-related error.
🔰 I have attached a demo sample source code below,
🔰 Finally, Run & Test Application
-📗 Clone Project from GitHub and then move on
-📗 After run application using live server
-📗 Login with Gmail account and accept require permission
-📗 Finally, Navigate Button and test.
I'm sorry I can't get enough time to optimize its example code. If anyone interested to work with this project then feels free to knock me. I came to share this example because I didn't found any complete tutorial on it. So I think it might be helpful for others.
👌 Congratulations. & Thanks for your time & passion. Feel free to comments, If you have any issues & queries. Follow me on Twitter
Top comments (2)
Thank you boy
Most welcome. I feel very happy! If It is helpful.