0

I am testing Laravel Api and using Sanctum for token and i followed the documentation for sanctum but when i used the Route as

Route::middleware('auth:sanctum')->get('user', function () { 
    return User::all();
});

I am getting the message as

{
    "message": "Unauthenticated."
} 

in postman . Also , i am passing the token in Authetication in postman (Bearer token).

enter image description here

Arun A S
  • 6,421
  • 4
  • 29
  • 43
shub-naik
  • 21
  • 1
  • 2

0 Answers0