Baileys Toolbox Docs

Daftar action advanced dan contoh payload yang tersedia di GUI dan REST API.

Baileys Toolbox

File ini merangkum kemampuan Baileys yang diekspos oleh backend ini melalui whitelist action. Sumber utama:

Catatan: backend ini tidak mengekspos raw socket method seperti query, sendRawMessage, sendNode, atau relayMessage karena terlalu mudah merusak session atau melanggar batas WhatsApp. Semua action di bawah tetap butuh WhatsApp terhubung kecuali status tertentu.

Endpoint

REST API dengan API key:

GET /baileys/capabilities
POST /baileys/action

Dashboard admin dengan password:

GET /admin/api/baileys/capabilities
POST /admin/api/baileys/action

Di dashboard /, semua action juga tersedia sebagai GUI:

1. Buka halaman utama. 2. Login dengan ADMIN_PASSWORD. 3. Buka panel Baileys Toolbox. 4. Pilih kategori. 5. Pilih action. 6. Isi field yang muncul otomatis. 7. Jalankan action.

Field sederhana dirender sebagai input/select/checkbox. Field array atau object dirender sebagai textarea JSON karena struktur datanya mengikuti tipe Baileys seperti WAMessageKey, contacts, atau ChatModification.

Session WhatsApp sendiri diamankan lewat panel Session Guard di dashboard. Panel itu berada di luar Baileys Toolbox karena tugasnya menjaga folder multi-file auth state agar tidak hilang saat deploy atau restart.

Body standar action:

{
  "action": "message.send",
  "params": {
    "to": "081234567890",
    "type": "text",
    "text": "Halo dari Baileys toolbox"
  }
}

Account

Contoh cek nomor:

{
  "action": "account.onWhatsApp",
  "params": {
    "phones": ["081234567890"]
  }
}

Messages

message.send mendukung content builder berikut:

Text:

{
  "action": "message.send",
  "params": {
    "to": "081234567890",
    "type": "text",
    "text": "Pesanan Anda sedang dikirim."
  }
}

Image dari URL:

{
  "action": "message.send",
  "params": {
    "to": "081234567890",
    "type": "image",
    "url": "https://example.com/image.jpg",
    "caption": "Bukti pengiriman"
  }
}

Document dari URL:

{
  "action": "message.send",
  "params": {
    "to": "081234567890",
    "type": "document",
    "url": "https://example.com/invoice.pdf",
    "mimetype": "application/pdf",
    "fileName": "invoice.pdf",
    "caption": "Invoice"
  }
}

Location:

{
  "action": "message.send",
  "params": {
    "to": "081234567890",
    "type": "location",
    "latitude": -8.6705,
    "longitude": 115.2126,
    "name": "Lokasi kurir",
    "address": "Denpasar"
  }
}

Poll:

{
  "action": "message.send",
  "params": {
    "to": "081234567890",
    "type": "poll",
    "name": "Pilih jadwal antar",
    "values": ["Pagi", "Siang", "Sore"],
    "selectableCount": 1
  }
}

Raw content object untuk format Baileys yang belum dibuatkan builder:

{
  "action": "message.send",
  "params": {
    "to": "081234567890",
    "content": {
      "text": "Raw content tetap lewat sendMessage Baileys"
    }
  }
}

Action lain:

Presence

Contoh typing:

{
  "action": "presence.update",
  "params": {
    "type": "composing",
    "to": "081234567890"
  }
}

Profile

Contoh ambil foto profil:

{
  "action": "profile.pictureUrl",
  "params": {
    "jid": "081234567890",
    "type": "image"
  }
}

Privacy

Contoh block:

{
  "action": "privacy.updateBlockStatus",
  "params": {
    "jid": "081234567890",
    "action": "block"
  }
}

Groups

Contoh list group:

{
  "action": "group.list",
  "params": {}
}

Contoh tambah peserta:

{
  "action": "group.participantsUpdate",
  "params": {
    "jid": "1203630xxxx@g.us",
    "participants": ["081234567890"],
    "action": "add"
  }
}

Business

Contoh business profile:

{
  "action": "business.profile",
  "params": {
    "jid": "081234567890"
  }
}

Newsletter / Channel

Contoh metadata:

{
  "action": "newsletter.metadata",
  "params": {
    "type": "jid",
    "key": "1203630xxxx@newsletter"
  }
}

Chat, Contacts, Calls

Contoh call link:

{
  "action": "call.createLink",
  "params": {
    "type": "video"
  }
}

Cara Cek Daftar Terbaru dari API

curl -X GET https://wa.example.com/baileys/capabilities \
  -H "x-api-key: API_KEY_KAMU"

Response berisi daftar action, kategori, parameter ringkas, dan URL sumber dokumentasi.