0

I have installed laravel breeze with sail, and I'm trying to make axios request, like

axios.get('/api/messages');

But I got an error

{"message":"Unauthenticated."}

I am authorized, and can open pages like "dashboard".
I added

axios.defaults.withCredentials = true;

to my "bootstrap.js" but it didn't help.

Lamantinoss
  • 159
  • 1
  • 8
  • 1
    show us a code logic in laravel to where does `'/api/messages'` route pointing at ? – aspirinemaga Jan 02 '23 at 03:51
  • how are you generating and passing tokens? also you can check my answer here on similar topic: https://stackoverflow.com/questions/74936904/question-password-reset-token-in-laravel-breeze-inertia-react/74937043#74937043 – RG Servers Jan 02 '23 at 04:08
  • I don't generate of pass tokens any way – Lamantinoss Jan 02 '23 at 14:08

0 Answers0