Skip to main content

What is an API?

 The abbreviation of an API is "Application Programming Interface". Many developers use APIs in their applications to enhance the working of their applications because without writing any complex codes they can use that various kinds of services through APIs.

We don't know how it is made but we can use all its features(the final product) a simple example we can consider is any food item we don't know how it is made but we enjoy the final product.

Let's take a small example, you often visit so many websites and you can see there will be a 'sign up' option when you click it you may able to see some options like 'sign in with google' or 'sign in with Twitter' or 'sign in with Facebook' , etc, so what happens back there when you click that, does the application directly interacts with google or any company servers?

No absolutely not this is where the APIs come into the picture, API's will act like a mediator between the servers and your application.

Let's assume you clicked on sign in with google then what happens is (you can refer to the below picture)

 


By referring to the above picture we can see the working flow of an API

 1. We click on the sign up with google button in that application

 2. Then for sign up an API will be there which is released by google

 3. So this API takes that request and tries to access the data from the google servers and verify us with        that data

 4. Then that verification sends back to the API

 5. That API will deliver us the success message

 Companies cant give direct access to their servers, right?

So these APIs will help us communicate with company servers and use their functionalities and services.

Many companies release their APIs some of them are free and some of them are paid.

If we take Google as an example their most popular API is Google maps, many food delivery applications use this API in their application, so here no application is directly accessing google maps instead it will ask the API first and then the API sends the request to google maps.

There are many more APIs like weather API, text-to-speech API, speech-to-text API, etc.

Finally, I would conclude that by using APIs it makes your job easier and you can use various features without coding them.  

 

Feel free to comment and Thank you for reading my blog :)

 


Comments

Popular posts from this blog

Working of VPN

VPN also known as a Virtual Private Network, this is used to establish a secure connection over the internet. By using the VPN we can surf over the web anonymously and our data will travel in encrypted form so that our data is not intercepted by other people. Why we use a VPN? Let us consider a situation, you are somewhere in a public place and you are connected to public Wi-Fi, Imagine you are entering a website and you want to enter sensitive data like your username and password, If any hacker connected to that public Wi-Fi then he can intercept all data what you are entering since you and the hacker are connected to the same Wi-Fi. So here if we use a VPN, our connection becomes private and the hacker will not be able to get our data since it will be in the encrypted form. How does a VPN work? Usually, the working flow of connecting to a web application is: In the browser we will enter the domain name --- Using the DNS this domain name converts into an IP address --- It goes to ISP ...

How web applications loads?

Ever imagined how a webpage is loading when we just enter that site name. Here I am gonna tell you how that works actually. Let's take an example website say 'www.abcd.com' , here "abcd" is called the domain name.  We will be having a system called 'Domain name System' which helps to translate domain names to IP addresses. So, first, when we type a website in our browser, our browser sends the request to the DNS server, and the DNS server gives the IP address of that website to our browser, now that IP address points to the respective server and gathers all required files for website loading and again it gives to the browser and at last, the browser will display us the webpage. In the above picture as we can see a website name 'www.abcd.com'. The following steps were done to load the webpage. User searches for 'www.abcd.com' in the web browser. The browser sends the website name to the 'DNS server' and requests it to give the IP add...

Localhost

  Q)Why 127.0.0.1 is known as localhost and why it is common for every system? -> This address is also known as the Loopback address, which means any request sent to this address is again sent back to the same machine. -> Here internal communication will be happening, so that no internet is required. -> We can test our application so safely without connecting to the internet, which helps us to create a controlled environment for the application to interact without affecting the outside world. A possible question may arise? Q) But every device will have a unique IP address know? Then how 127.0.0.1 is a localhost to every system? ->The range of IP addresses from 127.0.0.0 to 127.255.255.255 are specially reserved for loopback addresses by the Central Internet Authority  (IANA - Internet Assigned Numbers Authority) -> When we use the external communication(i.e., connecting to the internet to access the resources over the network), we require a unique IP address for...