@DevMaster_KS
but when it comes to providing access to my API for other developers
Do you mean to use the data on their site?
If that's what you mean, sanctum is fine. All they get is JSON returned data, right?
A good API should only return the needed data. The developer of that site determines who uses the api on their end with their authentication.
Like in a doctors office:
The initial attendant has access to enter vitals, but no results.
The doctor or nurse can get lab results from an API to discuss with you.
Their developer handled all of that, not you. Your API just gives the requested data.
I admit I have never dwelt with an SPA, but have dwelt with API's.
Note there are hundreds of different ways API's are done.
Edit:
I suggest to not try to make an API like a web app.
- Let a web app be for many users interactions like a forum or Amazon shopping
- Let an API be for returning needed data to a user or organization like weather forcast
Probably 85% of the api questions are better suited to be regular web apps that
are responsive (mobile friendly).