I\'m building an application which will be hosted on a server. I want to build an API for the application to facilitate interaction with from any platform (Web App, Mobile A
I think the best approach is to use OAuth2. Google it and you will find a lot of useful posts to help you set it up.
It will make easier to develop client applications for your API from a web app or a mobile one.
Hope it helps you.