npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kurtucoben/cstm-bail

v1.0.0

Published

Developed by Kurtu Coben, this is a powerful yet accessible modification of the WhatsApp API

Readme

WhatsApp Web API

WhatsApp API by Kurtu Coben

Looking to build something cool with WhatsApp? Check out WhatsApp Baileys an open-source library that lets you create smooth automations and integrations directly with WhatsApp. Instead of relying on a browser, it uses websocket technology to keep things light and efficient.

With Baileys, you can handle messages, manage chats and groups, create interactive messages with buttons, and build dynamic menus for a richer experience. It’s actively maintained, so updates regularly roll out to boost stability and performance. One big focus has been improving the pairing and login process making it more secure, reliable, and way less likely to drop off unexpectedly. You can even customize the pairing with your own code for extra control.

Whether you’re building a business bot, a customer service helper, or any kind of chat automation, Baileys is built to stay stable and packed with features. It’s designed to be modular and easy to plug into different systems, so you won’t get bogged down.

How to use?

just type like this shit

npm install @kurtucoben/baileys

or

yarn add @kurtucoben/baileys

import your code to create a connection to the library

const {
    default: makeWASocket,
    generateWAMessageFromContent,
    prepareWAMessageMedia,
    useMultiFileAuthState,
    Browsers,
    DisconnectReason,
    makeInMemoryStore,
    makeCacheableSignalKeyStore,
    fetchLatestBaileysVersion,
    proto,
    PHONENUMBER_MCC,
    getAggregateVotesInPollMessage,
    delay,
    areJidsSameUser
} = require('@kurtucoben/baileys');
const {
   default: WAConnection, makeWAMessage, 
   makeCacheableSignalKeyStore, downloadContentFromMessage, 
   emitGroupParticipantsUpdate, emitGroupUpdate, 
   generateWAMessageContent, generateWAMessage, 
   makeInMemoryStore, prepareWAMessageMedia, 
   generateWAMessageFromContent, MediaType, 
   areJidsSameUser, WAMessageStatus, 
   downloadAndSaveMediaMessage, AuthenticationState, 
   GroupMetadata, initInMemoryKeyStore, getContentType, 
   MiscMessageGenerationOptionsuseSingleFileAuthState, BufferJSON, 
   WAMessageProto, MessageOptions, WAFlag, WANode, WAMetric, 
   ChatModification, MessageTypeProto, WALocationMessage, 
   ReconnectMode, WAContextInfo, proto, WAGroupMetadata, ProxyAgent, 
   waChatKey, MimetypeMap, MediaPathMap, WAContactMessage, 
   WAContactsArrayMessage, WAGroupInviteMessage, 
   WATextMessage, WAMessageContent, WAMessage, BaileysError, 
   WA_MESSAGE_STATUS_TYPE, MediaConnInfo, URL_REGEX, WAUrlInfo, 
   WA_DEFAULT_EPHEMERAL, WAMediaUpload, mentionedJid, 
   Browser, MessageType, Presence, WA_MESSAGE_STUB_TYPES, 
   Mimetype, relayWAMessage, Browsers, GroupSettingChange,
   DisconnectReason, getStream, WAProto, isBaileys, PHONENUMBER_MCC, 
   AnyMessageContent, useMultiFileAuthState, fetchLatestBaileysVersion, 
   templateMessage, InteractiveMessage, Header } = require("@kurtucoben/baileys");

Links

Social Media

Follow For More Updates & Information

Kurt Cobain Smile For You

Why developers like it:

  • Pairing is more stable now - fewer fails and disconnections
  • Supports interactive messages, buttons, and dynamic menus
  • Supports interactive messages, action buttons, and dynamic menus
  • Manages sessions smoothly in the background
  • Works with WhatsApp’s latest multi-device feature
  • Lightweight and modular design for easy integration and customization
  • Comes with clear docs and ready-to-use examples

Ready to start?

Grab the library via npm or your package manager of choice, tweak the config, and dive right in. The example code is a great place to see how everything fits together. Use session storage and interactive features to build something solid that fits your project perfectly.


SendMessage Documentation

Album Message (Multiple Images)

Send multiple images in a single album message:

await sock.sendMessage(jid, { 
    albumMessage: [
        { image: maskurtu, caption: "Foto pertama" },
        { image: { url: "URL IMAGE" }, caption: "Foto kedua" }
    ] 
}, { quoted: m });

Event Message

Create and send WhatsApp event invitations:

await sock.sendMessage(jid, { 
    eventMessage: { 
        isCanceled: false, 
        name: "Hello World", 
        description: "lorem ipsum dolor sit amet", 
        location: { 
            degreesLatitude: 0, 
            degreesLongitude: 0, 
            name: "rowrrrr" 
        }, 
        joinLink: "https://call.whatsapp.com/video/krtucbens", 
        startTime: "1763019000", 
        endTime: "1763026200", 
        extraGuestsAllowed: false 
    } 
}, { quoted: m });

Poll Result Message

Display poll results with vote counts:

await sock.sendMessage(jid, { 
    pollResultMessage: { 
        name: "Hello World", 
        pollVotes: [
            {
                optionName: "TEST 1",
                optionVoteCount: "112233"
            },
            {
                optionName: "TEST 2",
                optionVoteCount: "1"
            }
        ] 
    } 
}, { quoted: m });

Simple Interactive Message

Send basic interactive messages with copy button functionality:

await sock.sendMessage(jid, {
    interactiveMessage: {
        header: "Hello World",
        title: "Hello World",
        footer: "instagram: @krtucbens ",
        buttons: [
            {
                name: "cta_copy",
                buttonParamsJson: JSON.stringify({
                    display_text: "copy code",
                    id: "123456789",              
                    copy_code: "ABC123XYZ"
                })
            }
        ]
    }
}, { quoted: m });

Interactive Message with Native Flow

Send interactive messages with buttons, copy actions, and native flow features:

await sock.sendMessage(jid, {    
    interactiveMessage: {      
        header: "Hello World",
        title: "Hello World",      
        footer: "instagram: @krtucbens",      
        image: { url: "https://example.com/image.jpg" },      
        nativeFlowMessage: {        
            messageParamsJson: JSON.stringify({          
                limited_time_offer: {            
                    text: "bahlil ajg",            
                    url: "https://ig.me/m/krtucbens",            
                    copy_code: "maskurtu",            
                    expiration_time: Date.now() * 999          
                },          
                bottom_sheet: {            
                    in_thread_buttons_limit: 2,            
                    divider_indices: [1, 2, 3, 4, 5, 999],            
                    list_title: "lorem ipsum dolor sit amet",            
                    button_title: "lorem ipsum dolor sit amet"          
                },          
                tap_target_configuration: {            
                    title: " X ",            
                    description: "FawkNyggers",            
                    canonical_url: "https://ig.me/m/krtucbens",            
                    domain: "shop.example.com",            
                    button_index: 0          
                }        
            }),        
            buttons: [          
                {            
                    name: "single_select",            
                    buttonParamsJson: JSON.stringify({              
                        has_multiple_buttons: true            
                    })          
                },          
                {            
                    name: "call_permission_request",            
                    buttonParamsJson: JSON.stringify({              
                        has_multiple_buttons: true            
                    })          
                },          
                {            
                    name: "single_select",            
                    buttonParamsJson: JSON.stringify({              
                        title: "Hello World",              
                        sections: [                
                            {                  
                                title: "title",                  
                                highlight_label: "label",                  
                                rows: [                    
                                    {                      
                                        title: "maskurtu",                      
                                        description: "lop yu",                      
                                        id: "row_2"                    
                                    }                  
                                ]                
                            }              
                        ],              
                        has_multiple_buttons: true            
                    })          
                },          
                {            
                    name: "cta_copy",            
                    buttonParamsJson: JSON.stringify({              
                        display_text: "copy code",              
                        id: "123456789",              
                        copy_code: "ABC123XYZ"            
                    })          
                }        
            ]      
        }    
    }  
}, { quoted: m });

Interactive Message with Thumbnail

Send interactive messages with thumbnail image and copy button:

await sock.sendMessage(jid, {
    interactiveMessage: {
        header: "Hello World",
        title: "Hello World",
        footer: "Instagram: @krtucbens",
        image: { url: "https://example.com/image.jpg" },
        buttons: [
            {
                name: "cta_copy",
                buttonParamsJson: JSON.stringify({
                    display_text: "copy code",
                    id: "123456789",
                    copy_code: "ABC123XYZ"
                })
            }
        ]
    }
}, { quoted: m });

Product Message

Send product catalog messages with buttons and merchant information:

await sock.sendMessage(jid, {
    productMessage: {
        title: "Produk Contoh",
        description: "Ini adalah deskripsi produk",
        thumbnail: { url: "https://example.com/image.jpg" },
        productId: "PROD001",
        retailerId: "RETAIL001",
        url: "https://example.com/product",
        body: "Detail produk",
        footer: "Harga spesial",
        priceAmount1000: 50000,
        currencyCode: "USD",
        buttons: [
            {
                name: "cta_url",
                buttonParamsJson: JSON.stringify({
                    display_text: "Beli Sekarang",
                    url: "https://example.com/buy"
                })
            }
        ]
    }
}, { quoted: m });

Interactive Message with Document Buffer

Send interactive messages with document from buffer (file system) - Note: Documents only support buffer:

await sock.sendMessage(jid, {
    interactiveMessage: {
        header: "Hello World",
        title: "Hello World",
        footer: "Instagram: @krtucbens",
        document: fs.readFileSync("./package.json"),
        mimetype: "application/pdf",
        fileName: "Epstein.pdf",
        jpegThumbnail: fs.readFileSync("./document.jpeg"),
        contextInfo: {
            mentionedJid: [jid],
            forwardingScore: 777,
            isForwarded: false
        },
        externalAdReply: {
            title: "Wabot",
            body: "bot wacap",
            mediaType: 3,
            thumbnailUrl: "https://example.com/image.jpg",
            mediaUrl: " X ",
            sourceUrl: "https://ig.me/m/krtucbens",
            showAdAttribution: true,
            renderLargerThumbnail: false         
        },
        buttons: [
            {
                name: "cta_url",
                buttonParamsJson: JSON.stringify({
                    display_text: "Instagram",
                    url: "https://ig.me/m/krtucbens",
                    merchant_url: "https://ig.me/m/krtucbens"
                })
            }
        ]
    }
}, { quoted: m });

Interactive Message with Document Buffer (Simple)

Send interactive messages with document from buffer (file system) without contextInfo and externalAdReply - Note: Documents only support buffer:

await sock.sendMessage(jid, {
    interactiveMessage: {
        header: "Hello World",
        title: "Hello World",
        footer: "Instagram: @krtucbens",
        document: fs.readFileSync("./package.json"),
        mimetype: "application/pdf",
        fileName: "Epstein.pdf",
        jpegThumbnail: fs.readFileSync("./document.jpeg"),
        buttons: [
            {
                name: "cta_url",
                buttonParamsJson: JSON.stringify({
                    display_text: "Instagram",
                    url: "https://ig.me/m/krtucbens",
                    merchant_url: "https://ig.me/m/krtucbens"
                })
            }
        ]
    }
}, { quoted: m });

Request Payment Message

Send payment request messages with custom background and sticker:

let quotedType = m.quoted?.mtype || '';
let quotedContent = JSON.stringify({ [quotedType]: m.quoted }, null, 2);

await sock.sendMessage(jid, {
    requestPaymentMessage: {
        currency: "IDR",
        amount: 10000000,
        from: m.sender,
        sticker: JSON.parse(quotedContent),
        background: {
            id: "100",
            fileLength: "0",
            width: 1000,
            height: 1000,
            mimetype: "image/webp",
            placeholderArgb: 0xFF00FFFF,
            textArgb: 0xFFFFFFFF,     
            subtextArgb: 0xFFAA00FF   
        }
    }
}, { quoted: m });

Why should choose my baileys?

This library delivers exceptional stability, a comprehensive feature set, and a continuously refined pairing process making it the ideal choice for building professional, secure WhatsApp automation. It also stays current with WhatsApp’s latest updates, so your projects remain compatible and future-proof.


Technical Highlights

  • Stable, secure custom pairing with resolved authentication issues
  • Support for interactive messages, action buttons, and dynamic menus
  • Efficient automatic session management for long-term reliability
  • Full compatibility with WhatsApp’s multi-device feature
  • Compatible with the latest multi-device features from WhatsApp
  • Easy to integrate and customize based on your needs
  • Perfect for developing bots, customer service automation, and other communication applications

Thanks for using our library! We're constantly improving it to keep up with the evolving needs of developers working on WhatsApp automation.