I\'m configuring a Laravel project to use Passport token authentication. Everything seems to be working, but when the auth:api middleware fails, it responds to the
auth:api
You can solve it by sending this header with your request.
Accept : application/json
This will send this message with 401 status code.
401
{ "message": "Unauthenticated." }