Level 4
@tfarzin, just a simple suggestion: have you ever tried to change the limiter word for api inside your RateLimiter?
I think the final solution also depends on the framework that you have installed. In my case, I'm using Laravel 9 with jetstream, and just for coincidence, it came already with a RateLimiter for api in the RouteServiceProvider:
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});