I’m not sure I completely understand the differences. Are they seperate or somehow connected?

Also I’ve read you can view kbin instances on Lemmy somehow. How does that work if they’re two different things?

I’m using Liftoff is it somehow possible to view kbin instances on there?

  • curiosityLynx@kglitch.social
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Simply put, the difference between a protocol and an API are that a protocol is how you communicate, while an API is a way for software to not just communicate with a server but get it to do things as if the software were a human using different, less efficient means.

    Let’s take pre-Elon Twitter for example: Twitter’s API allowed automated programs to tweet things without simulating a browser, “clicking” on “new tweet”, putting text in the text box and then “clicking” on “send”. Instead they could directly send the text and identification info to a part of Twitter’s API. This communication with the API happened through a protocol, most likely HTTP/HTTPS, because protocols have in-built ways to handle communication failures, encryption, etc.