I’m Not A Robot!
There is no one way to secure your API that fits all situations. But, you can learn the schemes, study how the biggest social networks are dealing with it and find out the industry standard; then apply it to your project in the way you see fit. At the end of this article, you’ll have a clear understanding of the different schemes.
I won’t go in depth on these here but I’ll do a deep dive on OAuth, the most widely used authorization framework, another time.