4 years ago

API Development

Posted 4 years ago by genzographics

Hello guys,

I am developing a web app using Laravel which would most likely need an RESTFull API in near future so I thought that it might be a good idea that I make even the web app consume its own API. Please note that I am going to use Lumen for the API development.

Now I have a few major questions in my mind that I'm not too sure about the answers or the relevant best practices.

  • First of all, is it a good idea to make the web app use its own API?
  • If yes, should I consume the API just in the way that an external user would use it? By this, I mean whether I should use the API requests over http(s) or there is a more efficient way especially performance wise (assuming that I want to host both source codes on the same server and the API site would be a subdomain of the main web app).
  • Next, what about the user or request authentication? Which authentication method should I use for the API? Is there any recommended library for this?

Thanks in advance.

Please sign in or create an account to participate in this conversation.