I can find ways to decrease the value but in my case I am running many asynchronous API calls and need to increase the X-RateLimit-Limit to something more than 100 to work.
following is the response which I am getting
P.S - I am using auth middleware also
eHTTP/1.1 429 Too Many Requests
Date: Fri, 10 Mar 2017 11:18:24 GMT Server: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.5.35 X-Powered-By: PHP/5.5.35 Cache-Control: no-cache X-RateLimit-Limit: 60 X-RateLimit-Remaining: 0 Retry-After: 24 Set-Cookie: XSRF-TOKEN=eyJpdiI6ImtuSU5EMXo0YXlrSU1MWnVnUFRyeUE9PSIsInZhbHVlIjoicVVkMU55V2lkcHNvMkRqaFlCUFZnK3lcL0pRckNpcjMyZll3UkVaWXNEYWhSazdcL2Jub3M4QmtpZDhDQWVCZjhzWE5KV0paaGlZMGJOQ1J1TGNFYnhkdz09IiwibWFjIjoiZTNlNzY3MDc2ZWExMjBhZDI0MjA3NzNjYjE5YWU1NmIzZmEyY2RiOWI4NDBmOGI5MjVmN2E2ZTUzNDE3YjdmNyJ9; expires=Fri, 10-Mar-2017 13:18:25 GMT; Max-Age=7200; path=/ Set-Cookie: laravel_session=eyJpdiI6IkRoSWV2dzFHV3F5YUJNR2tCMEhKSUE9PSIsInZhbHVlIjoiTzdhOW12ZFozNnJtaW5vRFBHdFVZV1l2SDdXcEpvdEN6MGdRTkZsRzFoeU9yb2VXTDN5cVA0a1d5NnZ1MCtEMTRKNFRES1ZsODg5YmswY2F5cEN0c1E9PSIsIm1hYyI6ImY5YjYyMmNiNDE1YzgxYmQ3NzE5NjYyMTk0YmEzNzU2NTg4MzZhZWYyNDVjMWVkMzJmNzRiMmUwODFjYjRiYWMifQ%3D%3D; expires=Fri, 10-Mar-2017 13:18:25 GMT; Max-Age=7200; path=/; httponly Content-Length: 18 Keep-Alive: timeout=5, max=99 Connection: Keep-Alive Content-Type: text/html; charset=UTF-8
Too Many Attempts.
You can set throttling parameters as in the image:
Your attempt to do set the API thottle greater than 60 like the following will be usurped by the setting in app/Http/Kernel.php
:
// routes/api.php
Route::get('myapi/{value}/{anothervalue}', 'MyApiController@getStuff')->middleware('throttle:100,1');
For the above to work, increase the limit in app/Http/Kernel.php
according to your specific requirements:
'api' => [
'throttle:500,1',
'bindings',
],
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With