Guides
Rate limits
The per-app, per-route and per-advertiser limits, codes 40100 and 40133, and how to test them in the sandbox.
TikTok limits calls per app, per route and per advertiser. In Mimicr the limits only apply with the enforceRateLimits toggle on (off by default), or when you exhaust the limit on purpose.
App limits
Counted per route and per app, by the app's level:
| Level | Per second | Per minute | Per day |
|---|---|---|---|
| Basic (default) | 10 | 600 | 864,000 |
| Advanced | 20 | 1,200 | 1,728,000 |
| Premium | 30 | 1,800 | 2,592,000 |
| Ultimate | 50 | 3,000 | 4,320,000 |
| Route with its own limit | Basic | Advanced | Premium | Ultimate |
|---|---|---|---|---|
/ad/create/ (per second / minute) | 5 / 150 | 10 / 200 | 10 / 300 | 15 / 300 |
/event/track/ | 1,000 per second at every level |
Over the limit: 40100 Requests made too frequently. (HTTP 200; on the Events API, HTTP 401). Going over the per-minute limit blocks the route for 5 minutes. The daily counter resets at midnight UTC.
Change the sandbox app's level with PUT /v1/tiktok-ads/app {"rate_level": "ADVANCED"}.
Advertiser limit
Besides the app, each advertiser has a per-route limit. In Mimicr it is 20 calls per second:
{ "code": 40133, "message": "Advertiser (7000000013373458730)'s QPS (21) reaches QPS limit 20 for current path, request is temporarily restricted.", "request_id": "…", "data": {} }How to react
- Treat
40100and40133as transient: wait and retry, with growing backoff. 40100is not a missing permission. Disconnecting the account on40100breaks integrations that are only calling too fast.- Spread ad creation:
/ad/create/has the lowest limit. Up to 20 creatives fit in one call.
Test it in the sandbox
# turns real counting on
curl --request PUT \
--url https://api.mimicr.dev/v1/tiktok-ads/homolog \
--header 'Authorization: Bearer mk_...' \
--header 'Content-Type: application/json' \
--data '{ "enforceRateLimits": true }'
# or force it: every call answers 40100 until the reset
npx mimicr action tiktok-ads ratelimit.exhaust scope=app
npx mimicr action tiktok-ads ratelimit.exhaust scope=advertiser # 40133 on an advertiser's routes
npx mimicr action tiktok-ads ratelimit.resetChaos also injects 40100 into a share of each area's calls (see Sandbox testing).
In Mimicr the second, minute and day windows are counted in memory on each server instance; the forced exhaustion from ratelimit.exhaust is stored in the sandbox and applies to all of them.