Before sending a free-form message (text, image, video, etc.), check whether the conversation window is open. The window opens when the contact sends you an inbound message and expires 24 hours later.
Get detailed window info (last inbound timestamp, expiration):
info = account.window("+33699887766")info["open"] # Trueinfo["last_inbound_at"] # "2026-03-06T10:00:00Z"info["expires_at"] # "2026-03-07T10:00:00Z"
Outside the 24h window, Meta only allows template messages. Free-form messages (text, media) will be rejected. Always check the window before sending non-template messages.
Media URLs must be publicly accessible. Meta downloads the file once and delivers it natively in the recipient’s WhatsApp chat. Supported formats: JPEG/PNG (image), MP4 (video), OGG/MP3 (audio), PDF/DOCX (document).
Meta file size limits: Image: 5 MB — Video: 16 MB — Audio: 16 MB — Document: 100 MB. Files exceeding these limits will be rejected by Meta.
Send a message with up to 3 reply buttons. The recipient taps a button and you receive the response via webhook.
# With dict buttons (full control over IDs)account.send_buttons( to="+33699887766", body="Would you like to proceed?", buttons=[ {"id": "confirm", "title": "Yes, confirm"}, {"id": "cancel", "title": "No, cancel"}, ],)# With string shortcuts (IDs auto-generated as btn_0, btn_1, ...)account.send_buttons( to="+33699887766", body="Rate your experience:", buttons=["Great", "OK", "Poor"],)
Limits: Max 3 buttons per message. Button titles max 20 characters. Interactive messages require an open 24h conversation window (no template fallback).