Consuming Your API With JavaScript 'web' => [ // Other middleware... LaravelPassportHttpMiddlewareCreateFreshApiToken::class, ], https://laravel.com/docs/5.3/passport#consuming-your-api-with-javascript