Website to Website API

I have a button on my web site. When you push it, it submits your email and password and logs you in to the site.

This process is called authentication - as 
abrahamKim
pointed out in a comment on another post. It's different than authorization. Authentication is verifying who you say you are. Authorization is giving you permission to do different things.

At Disneyland, if you pay with cash, you're authenticated as a human who has cash. That's sufficient. If you need to use a credit card to pay, the cashier will authenticate you by ensuring the driver's license matches the name on the credit card. This helps keep people from using stolen credit cards. Depending on the ticket you purchase, you may have limited authorization. Maybe one the more expensive ticket authorizes you for three days, while the cheaper tickets only authorize the ticket holder to enjoy rides for kids under 8. There's no sense in buying an adult ticket if the child isn't tall enough to ride safely. 

Web sites use authentication to make sure they're showing the content owners data. Authorization can very depending on the tier you pay for or the permissions given by the site's owner. Here on Adagia, Abe might have to authorize you to use the API to upload content — even if all he does to authorize you is trust you enough to share the unpublished URL. If I want to submit my writing to Adagia via the API, I can use a program that calls the same HTTP method that gets called with the Publish button this site. To submit our content to the database for storage, Abe has to write an API for his own forms to access. Then, he wires up the buttons to submit the content to his API. That API might call the DB access API and insert, update or delete an entry.

If somebody comes along and offers a translation service API - I could send my text to the translation service and then connect it to the API at Adagia - and post here in different language translations. It's an arbitrary idea, but if Abe wanted to market to a Spanish speaking audience, he could build that into his available services.

Companies who market their APIs - are targeting developers who can build services on top of their existing code. Wordpress Plugins are a great example of a mature ecosystem that takes advantage of existing APIs to give developers a business opportunity. They can write code that does some work and integrates to the existing content management system APIs that Wordpress has already defined.

If you ever see a company saying how great their APIs are - just know that they want developers to write programs that take advantage of their tools.

Companies who market their APIs - are targeting developers who can build services on top of their existing code. Wordpress Plugins are a great example of a mature ecosystem that takes advantage of existing APIs to give developers a business opportunity. 

My favorite example of this is Stripe. Their API and everything that is also required with any API -- documentation and SDKs -- are so beautiful and sane that it developers are willing to pay ultra premiums to use Stripe over a cheaper competitor.

I remember looking through Stripe's PHP SDK and feeling like I was reading biblical software
2021-04-02 02:02:39
I want to hear more about your experience with the docs at Stripe.
2021-04-02 04:55:03
I actually never had a biblical experience with their docs. I just always read on Twitter people raving about them.

My personal experience of being awed by Stripe is solely confined to their PHD SDK. Also SDK is just another word for API lol. but in this case it's an API for a Web API. And so they differentiate it by calling it SDK
2021-04-02 13:30:12

Writing an API - Collection