| name | meta-business |
| description | Skill for the Meta Business CLI. Complete WhatsApp, Instagram, Facebook Pages, and Messenger automation via the Graph API. Supports messaging, media, templates, analytics, webhooks, and systemd service management. |
Meta Business CLI
Use meta for WhatsApp, Instagram, Facebook Pages, and Messenger automation via the Graph API.
Setup
meta config set app.id YOUR_APP_ID
meta config set app.secret YOUR_APP_SECRET
meta auth login
meta config set whatsapp.phoneNumberId YOUR_PHONE_NUMBER_ID
meta config set whatsapp.businessAccountId YOUR_WABA_ID
meta doctor
Or use --token YOUR_TOKEN with any command to skip OAuth (e.g. System User tokens).
Authentication
meta auth login
meta auth login --token YOUR_ACCESS_TOKEN
meta auth login --scopes "whatsapp_business_messaging,instagram_basic,pages_show_list"
meta auth status
meta auth logout
Configuration
meta config set app.id YOUR_APP_ID
meta config set app.secret YOUR_APP_SECRET
meta config set whatsapp.phoneNumberId ID
meta config set whatsapp.businessAccountId ID
meta config set instagram.accountId ID
meta config set pages.pageId ID
meta config set webhook.forwardUrl URL
meta config get <key>
meta config list
Config stored at ~/.meta-cli/config.json.
WhatsApp
Sending Messages
meta wa send "+1234567890" --text "Hello" --json
meta wa send "+1234567890" --text "**bold** and _italic_" --markdown --json
meta wa send "+1234567890" --text "very long message..." --chunk --json
meta wa send "+1234567890" --image "https://example.com/photo.jpg" --caption "Look" --json
meta wa send "+1234567890" --video "https://example.com/video.mp4" --caption "Watch" --json
meta wa send "+1234567890" --document "https://example.com/file.pdf" --json
meta wa send "+1234567890" --document ./report.pdf --caption "Q4 report" --json
meta wa send "+1234567890" --audio "https://example.com/note.ogg" --json
meta wa send "+1234567890" --audio "./recording.ogg" --voice --json
meta wa send "+1234567890" --template "hello_world" --template-lang en_US --json
meta wa read WAMID --json
Media File Size Limits
| Type | Max Size |
|---|
| Image | 5 MB |
| Video | 16 MB |
| Document | 100 MB |
Templates
meta wa template list --json
meta wa template get TEMPLATE_NAME --json
meta wa template delete TEMPLATE_NAME --json
Media
meta wa media upload ./photo.jpg --json
meta wa media url MEDIA_ID --json
meta wa media download MEDIA_ID ./output.jpg
Analytics
meta wa analytics --days 30 --granularity DAY --json
Phone Number Management
meta wa phone list --json
meta wa phone get --json
meta wa phone select PHONE_NUMBER_ID
Allowlist (Prompt Injection Protection)
meta wa allowlist list
meta wa allowlist add "+1234567890"
meta wa allowlist remove "+1234567890"
When the allowlist is non-empty, meta wa send only delivers to listed numbers.
Instagram
meta ig publish --image "https://example.com/photo.jpg" --caption "My post" --json
meta ig publish --video "https://example.com/video.mp4" --caption "Watch this" --json
meta ig publish --video "https://example.com/reel.mp4" --reel --caption "New reel" --json
meta ig insights --period day --days 30 --json
meta ig insights --media-id MEDIA_ID --json
meta ig comments list MEDIA_ID --json
meta ig comments reply COMMENT_ID "Thanks!" --json
meta ig comments hide COMMENT_ID --json
meta ig comments delete COMMENT_ID --json
Instagram publish requires a public URL for images/videos (not local files).
Facebook Pages
meta fb post --message "Hello from the CLI" --json
meta fb post --message "Check this" --link "https://example.com" --json
meta fb list --limit 10 --json
meta fb insights --period day --days 30 --json
Messenger
meta messenger send PSID --text "Hello" --json
meta messenger send PSID --image "https://example.com/photo.jpg" --json
meta messenger send PSID --text "Update" --type MESSAGE_TAG --tag HUMAN_AGENT --json
meta messenger receive --json
meta messenger receive --conversation-id CONV_ID --json
Messenger messaging outside the 24h window requires a message tag.
Webhooks
meta webhook listen --port 3000 --verify-token TOKEN --app-secret SECRET
meta webhook verify --verify-token TOKEN --json
meta webhook subscribe \
--object whatsapp_business_account \
--fields messages \
--callback-url "https://example.com/webhook" --json
Set webhook.forwardUrl in config to POST inbound messages to an external service.
The webhook auto-sends read receipts and acknowledges reactions for inbound messages.
Webhook Service (systemd)
meta service install
meta service start
meta service stop
meta service restart
meta service status
meta service logs
meta service uninstall
Shell Completion
meta completion >> ~/.bashrc
meta completion >> ~/.zshrc
Diagnostics
meta doctor --json
Checks config, credentials, token validity, Graph API connectivity, permissions, and surface-specific asset access. Run before first use.
Global Flags
| Flag | Description |
|---|
--json | Structured output for scripting and agent use |
--verbose | Print debug logs to stderr |
--token TOKEN | Override stored credentials |
--api-version v22.0 | Pin a specific Graph API version |
Notes
- Always use
--json for structured output when automating.
- All commands work non-interactively when required args are passed as flags.
- Voice notes require OGG/Opus format to render correctly in WhatsApp.
- Files exceeding size limits are rejected with an actionable error.
- For larger files, host at a URL and pass the URL directly.