i use Laravel passport for auth
in route api.php
Route::get(\'/todos\', function(){ return \'hello\'; })->middleware(\'auth:api\');
Use Postman and set the Header Accept: application/json otherwise Laravel Passport would never know it's an API client and thus redirect to a /login page for the web.
Accept: application/json
see below image to see where to set the accept parameter: