How does an API work?

944 views

Twitter recently announced they will no longer support free access to the Twitter API. Everyone seems up in arms about it and I can’t figure out what an API even is. What would doing something like this actually affect?

I’ve tried looking up what an API is, but I can’t really wrap my head around it.

Edit: I’ve had so many responses to read through and there’s been a ton of helpful explanations! Much appreciated everyone 🙂 thanks for keeping this doofus in the know

In: 419

41 Answers

Anonymous 0 Comments

API is an Application Programming Interface. Ill skip past the authentication side, but really all websites pass data in a structured manner. In a simplistic API you can go to like mymusicsite/api/getSongById/SongId and the website will spit out a structured piece of information. You might get a json file which just says id=,name=,albumn=,songdatastream=, etc etc. The API is the full collection of those rules. You can link this to most programming languages to do stuff with.

Typically some super smart cookies will write up a library that organizes all of these rules. So a simplified program might just use the library and write something like login with this username and password and save the hall pass (token) the site gives me. Then use that hall pass with like “heres my tweet generate in code” to post a tweet.

So you can do all the crazy code stuff you want, like weather tracking, your instant news that follows popular websites, your automated song lyrics, and all the other fun stuff that makes Twitter fun, and then use that code snippet to post whatever information you’ve collected.

The API itself is just like a bank teller. They ask for your ID to make sure you are who you say, and then they’ll allow you do many things with your account based on your requests. The API/bank teller has access to the whole bank (more or less) but depending on who you are your ability to access and edit information is limited.

You are viewing 1 out of 41 answers, click here to view all answers.