Whatsapp

Send WhatsApp messages and manage contacts via the WhatsApp Business Cloud API.

majiayu000 Updated 567 repo stars

File contents

WhatsApp Business

Send messages and manage contacts via the WhatsApp Business Cloud API.

Environment Variables

  • WHATSAPP_ACCESS_TOKEN - Access token
  • WHATSAPP_PHONE_ID - Phone number ID

Send text message

curl -s -X POST -H "Authorization: Bearer $WHATSAPP_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  "https://graph.facebook.com/v19.0/$WHATSAPP_PHONE_ID/messages" \
  -d '{"messaging_product":"whatsapp","to":"15551234567","type":"text","text":{"body":"Hello from ThinkFleetBot!"}}' | jq '{messages}'

Send template message

curl -s -X POST -H "Authorization: Bearer $WHATSAPP_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  "https://graph.facebook.com/v19.0/$WHATSAPP_PHONE_ID/messages" \
  -d '{"messaging_product":"whatsapp","to":"15551234567","type":"template","template":{"name":"hello_world","language":{"code":"en_US"}}}' | jq '{messages}'

Notes

  • Phone numbers without + prefix.
  • Always confirm before sending messages.

majiayu000/claude-skill-registry-data/tree/main/communication/whatsapp commit a273e7138f

Frequently asked questions

npx skillmds@latest add majiayu000/whatsapp