Level 17
That depends, what are you trying to authenticate? Are you wanting a token for a user, for your SPA or for a mobile app?
I would have a look at the docs as it covers all of those cases https://laravel.com/docs/7.x/sanctum
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hey Laravelers
How can I create secret api token with sanctum ???
Please or to participate in this conversation.