WaConnect

Good to knowRate limits

Rate limits

How many requests you can make.

Each API key can make 120 requests per minute. The limit is per key, so separate systems with separate keys don't slow each other down.

Response headers#

Every response tells you where you stand:

HeaderMeaning
X-RateLimit-LimitRequests allowed in the window (120).
X-RateLimit-RemainingRequests left in the current window.
X-RateLimit-ResetSeconds until the window resets.

When you go over#

You get 429 Too Many Requests and a Retry-After header: the number of seconds to wait before trying again.

async function callWithRetry(request) {
  const response = await fetch(request)
  if (response.status !== 429) return response
  const waitSeconds = Number(response.headers.get("Retry-After") ?? 1)
  await new Promise((resolve) => setTimeout(resolve, waitSeconds * 1000))
  return fetch(request)
}

Tips#

  • Don't poll for new messages. Use webhooks — they push messages to you instantly and don't count against your limit.
  • Don't poll message status in a loop. The message.status webhook tells you when a message is delivered or read.
  • Sending lots of messages? Spread them out. WhatsApp itself is sensitive to bursts from new numbers, independent of our limit.