IDEN
Wacommerce

Mulai Cepat

Kirim pesan WhatsApp pertama Anda lewat Public API dalam beberapa baris.

Yang dibutuhkan: API key `nxk_live_xxx` dari halaman Developers dan nomor tujuan dalam format E.164 (`+628123456789`).

Kirim teks (cURL)

bashcurl https://dashboard.wacommerce.id/api/public/v1/messages \
  -H "Authorization: Bearer nxk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+628123456789",
    "type": "text",
    "text": { "body": "Halo dari Wacommerce 👋" }
  }'

TypeScript

typescriptconst res = await fetch("https://dashboard.wacommerce.id/api/public/v1/messages", {
  method: "POST",
  headers: {
    Authorization: "Bearer nxk_live_xxx",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    to: "+628123456789",
    type: "text",
    text: { body: "Halo dari Wacommerce 👋" }
  })
});
const data = await res.json();

Python

pythonimport requests

requests.post(
    "https://dashboard.wacommerce.id/api/public/v1/messages",
    headers={"Authorization": "Bearer nxk_live_xxx"},
    json={"to": "+628123456789", "type": "text", "text": {"body": "Halo dari Wacommerce"}},
)

Langkah berikutnya

  • Pasang webhook untuk menerima balasan
  • Pelajari template untuk pesan di luar jendela 24 jam