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

mustafaabdujalil's avatar

API token

i use postman to test api i use laravel registration and i add this line to create method 'api_token' => str_random(60),

but when i send request display error TokenMismatchException

0 likes
1 reply
mikevrind's avatar
Level 7

If you are building an API you could disable the CSRF token validation (via HTTP/kernel.php).

Please or to participate in this conversation.