i use Laravel passport for auth
in route api.php
Route::get(\'/todos\', function(){ return \'hello\'; })->middleware(\'auth:api\');
You also have to add another header Key: Accept and value: application/json