Create api key per/person
Hi guys. I need api key. How can i generate api key each company. My application will show data according to company. How can i it.
Use str_random(x) and save it in the companies table.
Thanks topvillas but Doesn't api key store up my user identify?
You're talking about JWT. That's a different thing that does indeed store the user's identity.
An API token just identifies who's making the request to the API.
If you want to use JWT then by far the most popular package is this ...
https://github.com/tymondesigns/jwt-auth
Please or to participate in this conversation.