Upstash · Method
ratelimit.getRemaining
getRemaining returns the remaining tokens or requests for an identifier and its reset timestamp. It is useful when an application needs to show or inspect the current rate-limit state.
Last updated
Syntax
ratelimit.getRemaining(identifier: string): Promise<{ remaining: number; reset: number }>In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
limitblockUntilReadyresetUsedTokenssetDynamicLimitgetDynamicLimit