TailTemplate Build stunning websites faster with our pre-designed Tailwind CSS templates

Fixing 429 Too Many Requests in Laravel

If you encountered the error message 429 too many requests in Laravel, it says you hit the limit of API requests.

If you open an app/Http/Kernel.php file and find a $middlewareGroups variable, you will see throttle:api middleware:

protected $middlewareGroups = [
        'api' => [
            'throttle:60,1',
            'bindings',
        ]
    ];

You can delete this middleware or change limits. In the first parameter, set the maximum number of requests per minute to be processed. The second parameter should include the number of minutes you need to wait before completing other requests when the limit of requests from the first parameter is exceeded.