Socket
Book a DemoInstallSign in
Socket

@neelegirl/wa-api

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neelegirl/wa-api

Multi Session Whatsapp Library

1.4.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

💌 @neelegirl/wa-api → onimai

Elegante & einfache WhatsApp-Bibliothek zur Verwaltung mehrerer Sessions – mit universeller sendMessage-Funktion und direkter relayMessage-Unterstützung für Profis.

📚 Inhaltsverzeichnis

  • 📦 Installation
  • 🔌 Import & Setup
  • 📲 Session Management
  • 💬 Nachrichten senden (sendMessage)
  • 🔧 Spezialfunktionen (relayMessage)
  • 🎧 Listener
  • 🚨 Fehlerbehandlung

📦 Installation

npm install @neelegirl/wa-api@latest

🔌 Import & Setup

// CommonJS
const onimai = require('@neelegirl/wa-api');

// ES Module
import * as onimai from '@neelegirl/wa-api';

📲 Session Management

await onimai.startSession('session1');
await onimai.startSessionWithPairingCode('session2', {
  phoneNumber: '491234567890'
});
const all = onimai.getAllSession();
const one = onimai.getSession('session1');
const loaded = await onimai.loadSessionsFromStorage();

💬 Nachrichten senden (sendMessage)

await onimai1.sendMessage(sessionId, jidOrPhone, content, options);

✨ Beispieltypen

📨 Typ📘 Beschreibung🧾 Inhalt Beispiel
TextEinfache Nachricht{ text: 'Hallo!' }
BildBild mit Caption{ image: { url: './img.png' }, caption: 'Hey' }
VideoVideo mit Caption{ video: { url: './vid.mp4' }, caption: 'Video' }
GIFLoop-Video{ video: { url: './gif.mp4' }, gifPlayback: true }
AudioVoice Note (OGG/Opus){ audio: fs.createReadStream('voice.ogg'), mimetype: 'audio/ogg', ptt: true }
DokumentPDF o.ä. senden{ document: { url: './doc.pdf', filename: 'Beispiel.pdf' } }
UmfragePoll-Optionen{ pollCreationMessage: { name: 'Frage?', options: [...], selectableCount: 1 } }
ReaktionEmoji antworten{ react: { text: '❤️', key: msg.key } }
LöschenNachricht zurückziehen{ delete: msg.key }
PinNachricht anpinnen{ pin: { type: 1, time: 3600, key: msg.key } }
KontaktvCard teilen{ contacts: { displayName: 'Max', contacts: [{ vcard }] } }
StandortStandort senden{ location: { degreesLatitude: 52.52, degreesLongitude: 13.405 } }
WeiterleitenNachricht weitergeben{ forward: origMsg }
StatusStory posten{ video: { url: 'story.mp4' }, caption: 'Mein Status' }

🔧 Spezialfunktionen (relayMessage)

Nachricht löschen (Revoke)

await onimai1.relayMessage(sessionId, chatJid, {
  protocolMessage: {
    key: { remoteJid: chatJid, fromMe: true, id: targetId },
    type: 7
  }
}, { messageId: targetId });

Ephemeral-Modus (24h ein/aus)

await onimai1.relayMessage(sessionId, groupJid, {
  disappearingMessagesInChat: onimai.Defaults.WA_DEFAULT_EPHEMERAL
}, {});

await onimai.relayMessage(sessionId, groupJid, {
  disappearingMessagesInChat: 0
}, {});

Status posten (Story)

await onimai1.relayMessage(sessionId, 'status@broadcast', {
  videoMessage: { url: './story.mp4' },
  caption: 'Meine Story'
}, {
  statusJidList: ['491234567890@s.whatsapp.net']
});

Weiterleiten

await onimai1.relayMessage(sessionId, chatJid, {
  forward: origMsg
}, { messageId: origMsg.key.id });

Profilbild ändern

await onimai1.relayMessage(sessionId, userJid, {
  profilePictureChange: {
    displayPicture: fs.readFileSync('./newprofile.jpg')
  }
}, { messageId: 'updateProfile' });

Chat als gelesen markieren

await onimai1.relayMessage(sessionId, chatJid, {
  protocolMessage: {
    key: { remoteJid: chatJid },
    type: 3
  }
}, { messageId: 'markRead' });

Eigene Nachrichten-ID festlegen

await onimai1.relayMessage(
  msg.sessionId,
  msg.key.remoteJid,
  { conversation: 'Custom Message ID' },
  { messageId: `onimai${Date.now()}` }
);

🎧 Listener

onimai.onConnected(id => console.log('✅ Online:', id));
onimai.onQRUpdated(info => console.log('📲 QR-Code:', info));
onimai.onMessageReceived(msg => console.log('📥 Nachricht:', msg));

🚨 Fehlerbehandlung

try {
  await onimai1.sendMessage(...);
} catch (e) {
  console.error('⚠️ Fehler:', e);
}

👩‍💻 Autorin & Support

© 2026 @neelegirl/wa-api
💌 Support: neelehoven@gmail.com 📚 Dokumentation: wa-api.org

FAQs

Package last updated on 26 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.