Below code was working perfectly when the driver was api. Then I created a new project and changed the driver to passport.
Now, I am always getting Error: Unauthoriz
have you followed the passport documentation: https://laravel.com/docs/5.6/passport ?
In order to get the OAuth authentication, you need more parameters in the body apart from the bearer token.
{
"grant_type":"password",
"client_id":"CLIENT_ID",
"client_secret":"YOUR_SECRET",
"username":"USERNAME",
"password":"PASSWORD",
"scope":""
}