Skip to content
Contents

Guides

Rate limits

Each Nipto API token allows 2,000 calls a day, counted per UTC day, with headers telling what is left.

Each token allows 2,000 calls a day. The count starts over at midnight UTC, whatever the time zone of your tribe.

Headers

Every answer to a call with a valid token tells where you stand:

HeaderMeaning
X-RateLimit-LimitCalls allowed per day: 2000
X-RateLimit-RemainingCalls left today, this one included
X-RateLimit-ResetWhen the count starts over, in seconds since 1970 (next midnight UTC)
Retry-AfterOnly once nothing is left: seconds to wait before the next call goes through

Over the limit

Past 2,000 calls, the API answers 429 with the code TOO_MANY_REQUESTS until midnight UTC. Refused calls are not counted.

{
  "errors": [
    { "message": "Rate limit exceeded", "extensions": { "code": "TOO_MANY_REQUESTS" } }
  ]
}

Stay well under it

  • A sensor polled every 30 seconds makes 2,880 calls a day: more than the limit on its own. Every 5 minutes (288 calls a day) is plenty for chores.
  • Ask for everything you need in one query. { users { name } activities { uid } } is one call, not two.
  • Several operations sent together as a JSON array count as one call.
  • All members of a tribe have their own tokens, each with its own 2,000 calls.