Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

darkylmnx's avatar

Laravel cookies & CSRF: Testing APIs with Insomnia

Hi all,

I've been trying to test my APIs with Insomnia which is a Postman alternative. I'm using the session-based auth with Laravel 8 Sanctum.

But on each call, I get a 419 HTTP response code.

Even with the pre-call to sanctum/csrf-cookie as mentioned in the docs.

I don"t know it it's a "Origin" issue or what, but Insomnia sends all the cookies & CSRF headers necessary.

What can be the issue here?

0 likes
0 replies

Please or to participate in this conversation.