0

I'm new in laravel, I want to create basic Laravel API without login authentication to get the token. Is there a way to create a static API token that can access fron header?, any answer would be appreciated.

2 Answers2

0

You can do it using Laravel Passport. Read the documentation here https://laravel.com/docs/5.6/passport

Pedro
  • 113
  • 1
  • 7
0

You should use Laravel Passport definitely.

Documentation of Passport and underlying Oauth2 Server, could be a way better.

But despite this fact, it is a way to go, for building real, good working API.

If you want to use password grant token only (which is the most used scenario) then this post might be helpful to you...

Bart
  • 1,889
  • 1
  • 21
  • 38