View Source Code

Rate Limit

Throttle

Limit the amount of times an request can be made by a given key.

Request

  • type
    string
  • key
    string
  • requests
    number
  • period
    number

Response

Usage

1. Install the module

2. Use this script

const data = await ctx.modules.rate_limit.throttle({
  // Request body
});