Rule 1 — Send 200 immediately, process after
Meta expects a200 response within a few seconds. If it doesn’t get one, it retries the same
event — which means your bot processes the same message twice.
| Response | What Meta does |
|---|---|
| 200 immediately | Never retries — done |
| No response / timeout | Retries for up to 24 hours |
| 500 error | Retries |
Rule 2 — Deduplicate by message ID
Because Meta retries, the same message can arrive twice with the sameid. Store seen IDs and
skip duplicates:
Rule 3 — Don’t trust order
If a customer sends “Hi”, “How are you?”, “Hello?” quickly, Meta does not guarantee they arrive in order. If order matters, sort by the messagetimestamp:
Frequently asked
Why is my bot replying twice to the same message?
Why is my bot replying twice to the same message?
Your server is not responding 200 fast enough, or it’s doing slow work before sending 200.
Meta retries and your handler runs twice. Fix: send 200 first, then process.
Do I need to worry about duplicate messages on a test setup?
Do I need to worry about duplicate messages on a test setup?
Not much — duplicates are rare in testing. But in production with real traffic, always
deduplicate by
message.id.
