Baileys Toolbox
File ini merangkum kemampuan Baileys yang diekspos oleh backend ini melalui whitelist action. Sumber utama:
- Baileys Socket docs: https://baileys.wiki/docs/category/socket/
- Connecting: https://baileys.wiki/docs/socket/connecting/
- Sending Messages: https://baileys.wiki/docs/socket/sending-messages/
- Presence and Receipts: https://baileys.wiki/docs/socket/presence-receipts/
- Group Management: https://baileys.wiki/docs/socket/group-management/
- Privacy: https://baileys.wiki/docs/socket/privacy/
- App State Updates: https://baileys.wiki/docs/socket/app-state-updates/
- Business Features: https://baileys.wiki/docs/socket/business-features/
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
account.status: status socket backend.account.onWhatsApp: cek nomor terdaftar di WhatsApp.account.requestPairingCode: request pairing code untuk login tanpa QR.account.logout: logout session WhatsApp.
Contoh cek nomor:
{
"action": "account.onWhatsApp",
"params": {
"phones": ["081234567890"]
}
}
Messages
message.send mendukung content builder berikut:
textimagevideoaudiodocumentstickerlocationcontactpollreactiondeletedisappearing- raw Baileys
contentobject
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:
message.read: mark message read denganWAMessageKey[].message.receipt: kirim receipt.
Presence
presence.update:unavailable,available,composing,recording,paused.presence.subscribe: subscribe presence update chat.
Contoh typing:
{
"action": "presence.update",
"params": {
"type": "composing",
"to": "081234567890"
}
}
Profile
profile.pictureUrlprofile.fetchStatusprofile.fetchDisappearingDurationprofile.updateNameprofile.updateStatusprofile.updatePictureprofile.removePicture
Contoh ambil foto profil:
{
"action": "profile.pictureUrl",
"params": {
"jid": "081234567890",
"type": "image"
}
}
Privacy
privacy.fetchSettingsprivacy.fetchBlocklistprivacy.updateBlockStatusprivacy.updateLastSeenprivacy.updateOnlineprivacy.updateProfilePictureprivacy.updateStatusprivacy.updateReadReceiptsprivacy.updateGroupsAddprivacy.updateCallsprivacy.updateMessagesprivacy.updateLinkPreviewsprivacy.updateDefaultDisappearingMode
Contoh block:
{
"action": "privacy.updateBlockStatus",
"params": {
"jid": "081234567890",
"action": "block"
}
}
Groups
group.listgroup.metadatagroup.creategroup.leavegroup.updateSubjectgroup.updateDescriptiongroup.participantsUpdategroup.requestParticipantsListgroup.requestParticipantsUpdategroup.inviteCodegroup.revokeInvitegroup.acceptInvitegroup.getInviteInfogroup.toggleEphemeralgroup.settingUpdategroup.memberAddModegroup.joinApprovalMode
Contoh list group:
{
"action": "group.list",
"params": {}
}
Contoh tambah peserta:
{
"action": "group.participantsUpdate",
"params": {
"jid": "1203630xxxx@g.us",
"participants": ["081234567890"],
"action": "add"
}
}
Business
business.profilebusiness.catalogbusiness.collectionsbusiness.orderDetails
Contoh business profile:
{
"action": "business.profile",
"params": {
"jid": "081234567890"
}
}
Newsletter / Channel
newsletter.createnewsletter.metadatanewsletter.subscribersnewsletter.follownewsletter.unfollownewsletter.mutenewsletter.unmutenewsletter.updateNamenewsletter.updateDescriptionnewsletter.reactMessagenewsletter.fetchMessagesnewsletter.subscribeUpdatesnewsletter.adminCountnewsletter.delete
Contoh metadata:
{
"action": "newsletter.metadata",
"params": {
"type": "jid",
"key": "1203630xxxx@newsletter"
}
}
Chat, Contacts, Calls
chat.modify: archive, pin, mute, clear, mark read, delete, labels, quick replies sesuaiChatModificationBaileys.contact.addOrEditcontact.removecall.createLink
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.