Newsletters
WhatsApp Channels, from the socket. Newsletter JIDs end in @newsletter. Posting to a channel is just sendMessage โ with channel-specific rules below.
Method reference
| Method | Notes |
|---|---|
newsletterCreate(name, description?) | Create a channel you own โ NewsletterMetadata |
newsletterMetadata('invite' | 'jid', key) | Look up a channel by invite link key or by JID |
newsletterFollow(jid) / newsletterUnfollow(jid) | Follow / unfollow a channel |
newsletterMute(jid) / newsletterUnmute(jid) | Silence or restore channel notifications |
newsletterUpdateName(jid, name) | Rename your channel |
newsletterUpdateDescription(jid, description) | Update the channel description |
newsletterUpdatePicture(jid, content) / newsletterRemovePicture(jid) | Channel avatar management (WAMediaUpload โ URL, Buffer, or stream) |
newsletterUpdate(jid, updates) | Generic metadata update |
newsletterSubscribers(jid) | Subscriber list of your channel |
newsletterAdminCount(jid) | How many admins the channel has |
newsletterChangeOwner(jid, newOwnerJid) | Transfer channel ownership |
newsletterDemote(jid, userJid) | Demote a channel admin |
newsletterDelete(jid) | Delete your channel โ irreversible |
newsletterReactMessage(jid, serverId, reaction?) | React to a channel post by its server ID; omit reaction to remove yours |
newsletterFetchMessages(jid, count, since, after) | Fetch channel posts (count + time window) |
subscribeNewsletterUpdates(jid) | Subscribe to live channel updates โ events like newsletter.view / newsletter.reaction |
Running a channel from a bot
// Create once, keep the JID
const channel = await sock.newsletterCreate('AunuCore Updates', 'Releases & announcements')
console.log('Channel JID:', channel.id)
// Post text + media โ media uses the dedicated newsletter upload
// paths automatically since v1.0.2 (see below)
await sock.sendMessage(channel.id, { text: 'AunuBaileys v1.0.5 is out โ AunuAntiBan inside ๐ก๏ธ' })
await sock.sendMessage(channel.id, {
image: { url: 'https://example.com/banner.jpg' },
caption: 'Release banner'
})
// Read the room: fetch recent posts and react to one
const posts = await sock.newsletterFetchMessages(channel.id, 10, 0, 0)
The v1.0.2 newsletter media fix โ why versions matter here
Before 1.0.2, media sent to channels went through the regular chat upload paths, and WhatsApp's channel infrastructure rejected or mangled it โ the classic symptom was channel posts arriving without working media. AunuBaileys 1.0.2 routes channel media through the dedicated newsletter media paths (NEWSLETTER_MEDIA_PATH_MAP) with server-side thumbnail/transcode handling. If channel media misbehaves, the first diagnostic is your version: be on โฅ 1.0.2.
IDs, carefully
Channel JIDs (120363โฆ@newsletter) are not the same as the channel's numeric ID used in some payloads. sock.aunuHandler.newsletterId(jid) (v1.0.3+) extracts the numeric ID from a newsletter JID โ use it when an API or payload asks for the raw ID instead of slicing strings yourself.
pollCreationMessageV5) is carried by the package since v1.0.3, wrapped FutureProof-style because the base proto predates it.