Can you check as like below.
auth('passport')->user()->permission
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, everyone!
I'm building an API, where each role is able to access different end points.
I never have done it on an API, in some other systems I already have used spatie/laravel-permission.
Could domeone help me in how to check for permissions on an API? I'm using Passport as auth
You can still use the same package for your api authorization e.g. which users can access which routes/resources. For authentication it depends on your use case for your app but if you want to use usernames/passwords you can use a password grant type
Please or to participate in this conversation.