You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Venom is a high-performance system developed with JavaScript to create a bot for WhatsApp, support for creating any interaction, such as customer service, media sending, sentence recognition based on artificial intelligence and all types of design architecture for WhatsApp.
It's a high-performance alternative API to whatzapp, you can send, text messages, files, images, videos and more.
Remember, the API was developed on a platform called RESTful Web services, providing interoperability between computer systems on the Internet.
It uses a set of well-defined operations that apply to all information resources: HTTP itself defines a small set of operations, the most important being POST, GET, PUT and DELETE.
Use it in your favorite language like PHP, Python, C# and others. as long as your language is supported with the HTTP protocol, you will save time and money. you don't need to know how Venom works, we have the complete API documentation, in a professional way!
Get our official API Venom ! Contact us!
Venom group support on Telegram
Meet the Superchats
SuperChats is a premium library with unique features that control Whatsapp functions with socket.
With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp
Superchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide
> npm i --save https://github.com/orkestral/venom/releases/download/nightly/venom-bot-nightly.tgz
Installing the current repository "you can download the beta version from the current repository!"
> npm i github:orkestral/venom
Getting started Multidevice and Normal
// Supports ES6// import { create, Whatsapp } from 'venom-bot';constvenom=require('venom-bot');venom.create({session: 'session-name',//name of sessionmultidevice: true// for version not multidevice use false.(default: true)}).then((client)=>start(client)).catch((erro)=>{console.log(erro);});functionstart(client){client.onMessage((message)=>{if(message.body==='Hi'&&message.isGroupMsg===false){client.sendText(message.from,'Welcome Venom 🕷').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});}});}
After executing create() function, venom will create an instance of whatsapp web. If you are not logged in, it will print a QR code in the terminal. Scan it with your phone and you are ready to go!
Venom will remember the session so there is no need to authenticate everytime.
Multiples sessions can be created at the same time by pasing a session name to create() function:
// Init sales whatsapp botvenom.create('sales').then((salesClient)=>{...});// Init support whatsapp botvenom.create('support').then((supportClient)=>{...});
Optional create parameters
Venom create() method third parameter can have the following optional parameters:
constvenom=require('venom-bot');venom.create(//session'sessionName',//Pass the name of the client you want to start the bot//catchQR(base64Qrimg,asciiQR,attempts,urlCode)=>{console.log('Number of attempts to read the qrcode: ',attempts);console.log('Terminal qrcode: ',asciiQR);console.log('base64 image string qrcode: ',base64Qrimg);console.log('urlCode (data-ref): ',urlCode);},// statusFind(statusSession,session)=>{console.log('Status Session: ',statusSession);//return isLogged || notLogged || browserClose || qrReadSuccess || qrReadFail || autocloseCalled || desconnectedMobile || deleteToken || chatsAvailable || deviceNotConnected || serverWssNotConnected || noOpenBrowser || initBrowser || openBrowser || connectBrowserWs || initWhatsapp || erroPageWhatsapp || successPageWhatsapp || waitForLogin || waitChat || successChat//Create session wss return "serverClose" case server for closeconsole.log('Session name: ',session);},// options{multidevice: false,// for version not multidevice use false.(default: true)folderNameToken: 'tokens',//folder name when saving tokensmkdirFolderToken: '',//folder directory tokens, just inside the venom folder, example: { mkdirFolderToken: '/node_modules', } //will save the tokens folder in the node_modules directoryheadless: true,// Headless chromedevtools: false,// Open devtools by defaultuseChrome: true,// If false will use Chromium instancedebug: false,// Opens a debug sessionlogQR: true,// Logs QR automatically in terminalbrowserWS: '',// If u want to use browserWSEndpointbrowserArgs: [''],// Original parameters ---Parameters to be added into the chrome browser instanceaddBrowserArgs: [''],// Add broserArgs without overwriting the project's originalpuppeteerOptions: {},// Will be passed to puppeteer.launchdisableSpins: true,// Will disable Spinnies animation, useful for containers (docker) for a better logdisableWelcome: true,// Will disable the welcoming message which appears in the beginningupdatesLog: true,// Logs info updates automatically in terminalautoClose: 60000,// Automatically closes the venom-bot only when scanning the QR code (default 60 seconds, if you want to turn it off, assign 0 or false)createPathFileToken: false,// creates a folder when inserting an object in the client's browser, to work it is necessary to pass the parameters in the function create browserSessionTokenchromiumVersion: '818858',// Version of the browser that will be used. Revision strings can be obtained from omahaproxy.appspot.com.addProxy: [''],// Add proxy server exemple : [e1.p.webshare.io:01, e1.p.webshare.io:01]userProxy: '',// Proxy login usernameuserPass: ''// Proxy password},// BrowserSessionToken// To receive the client's token use the function await clinet.getSessionTokenBrowser(){WABrowserId: '"UnXjH....."',WASecretBundle:
'{"key":"+i/nRgWJ....","encKey":"kGdMR5t....","macKey":"+i/nRgW...."}',WAToken1: '"0i8...."',WAToken2: '"1@lPpzwC...."'},// BrowserInstance(browser,waPage)=>{console.log('Browser PID:',browser.process().pid);waPage.screenshot({path: 'screenshot.png'});}).then((client)=>{start(client);}).catch((erro)=>{console.log(erro);});
Callback Status Session
Gets the return if the session is isLogged or notLogged or browserClose or qrReadSuccess or qrReadFail or autocloseCalled or desconnectedMobile or deleteToken or chatsAvailable or deviceNotConnected or serverWssNotConnected or noOpenBrowser or initBrowser or openBrowser or connectBrowserWs or initWhatsapp or erroPageWhatsapp or successPageWhatsapp or waitForLogin or waitChat or successChat or Create session wss return "serverClose" case server for close
Status
Condition
isLogged
When the user is already logged in to the browser
notLogged
When the user is not connected to the browser, it is necessary to scan the QR code through the cell phone in the option WhatsApp Web
browserClose
If the browser is closed this parameter is returned
qrReadSuccess
If the user is not logged in, the QR code is passed on the terminal a callback is returned. After the correct reading by cell phone this parameter is returned
qrReadFail
If the browser stops when the QR code scan is in progress, this parameter is returned
autocloseCalled
The browser was closed using the autoClose command
desconnectedMobile
Client has desconnected in to mobile
serverClose
Client has desconnected in to wss
deleteToken
If you pass true within the function client.getSessionTokenBrowser(true)
chatsAvailable
When Venom is connected to the chat list
deviceNotConnected
Chat not available because the phone is disconnected (Trying to connect to the phone)
serverWssNotConnected
The address wss was not found!
noOpenBrowser
It was not found in the browser, or some command is missing in args
initBrowser
Starting the browser
openBrowser
The browser has been successfully opened!
connectBrowserWs
Connection with BrowserWs successfully done!
initWhatsapp
Starting whatsapp!
erroPageWhatsapp
Error accessing whatsapp page
successPageWhatsapp
Page Whatsapp successfully accessed
waitForLogin
Waiting for login verification!
waitChat
Waiting for the chat to load
successChat
Chat successfully loaded!
constvenom=require('venom-bot');venom.create('sessionName',undefined,(statusSession,session)=>{console.log('Status Session: ',statusSession);//return isLogged || notLogged || browserClose || qrReadSuccess || qrReadFail || autocloseCalled || desconnectedMobile || deleteToken || chatsAvailable || deviceNotConnected || serverWssNotConnected || noOpenBrowser || initBrowser || openBrowser || connectBrowserWs || initWhatsapp || erroPageWhatsapp || successPageWhatsapp || waitForLogin || waitChat || successChat//Create session wss return "serverClose" case server for closeconsole.log('Session name: ',session);},{multidevice: false// for version not multidevice use false.(default: true)}).then((client)=>{start(client);}).catch((erro)=>{console.log(erro);});
Exporting QR Code
By default QR code will appear on the terminal. If you need to pass the QR
somewhere else heres how:
constfs=require('fs');constvenom=require('venom-bot');venom.create('sessionName',(base64Qr,asciiQR,attempts,urlCode)=>{console.log(asciiQR);// Optional to log the QR in the terminalvarmatches=base64Qr.match(/^data:([A-Za-z-+\/]+);base64,(.+)$/),response={};if(matches.length!==3){returnnewError('Invalid input string');}response.type=matches[1];response.data=newBuffer.from(matches[2],'base64');varimageBuffer=response;require('fs').writeFile('out.png',imageBuffer['data'],'binary',function(err){if(err!=null){console.log(err);}});},undefined,{logQR: false}).then((client)=>{start(client);}).catch((erro)=>{console.log(erro);});
Downloading Files
Puppeteer takes care of the file downloading. The decryption is being done as
fast as possible (outruns native methods). Supports big files!
importfs=require('fs');importmime=require('mime-types');client.onMessage(async(message)=>{if(message.isMedia===true||message.isMMS===true){constbuffer=awaitclient.decryptFile(message);// At this point you can do whatever you want with the buffer// Most likely you want to write it into a fileconstfileName=`some-file-name.${mime.extension(message.mimetype)}`;awaitfs.writeFile(fileName,buffer,(err)=>{
...
});}});
Basic Functions (usage)
Not every available function is listed, for further look, every function
available can be found in here and here
Chatting
Here, chatId could be <phoneNumber>@c.us or <phoneNumber>-<groupId>@g.us
// Send List menu//This function does not work for Bussines contactsconstlist=[{title: "Pasta",rows: [{title: "Ravioli Lasagna",description: "Made with layers of frozen cheese",}]},{title: "Dessert",rows: [{title: "Baked Ricotta Cake",description: "Sweets pecan baklava rolls",},{title: "Lemon Meringue Pie",description: "Pastry filled with lemonand meringue.",}]}];awaitclient.sendListMenu('[email protected]','Title','subTitle','Description','menu',list).then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send Messages with Buttons Replyconstbuttons=[{"buttonText": {"displayText": "Text of Button 1"}},{"buttonText": {"displayText": "Text of Button 2"}}]awaitclient.sendButtons('[email protected]','Title',buttons,'Description').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send audio file MP3awaitclient.sendVoice('[email protected]','./audio.mp3').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send audio file base64awaitclient.sendVoiceBase64('[email protected]',base64MP3).then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send contactawaitclient.sendContactVcard('[email protected]','[email protected]','Name of contact').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send a list of contact cardsawaitclient.sendContactVcardList('[email protected]',['[email protected]','[email protected]',]).then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send basic textawaitclient.sendText('[email protected]','👋 Hello from venom!').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send locationawaitclient.sendLocation('[email protected]','-13.6561589','-69.7309264','Brasil').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Automatically sends a link with the auto generated link preview. You can also add a custom message to be added.awaitclient.sendLinkPreview('[email protected]','https://www.youtube.com/watch?v=V1bFr2SWP1I','Kamakawiwo ole').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send image (you can also upload an image using a valid HTTP protocol)awaitclient.sendImage('[email protected]','path/to/img.jpg','image-name','Caption text').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send image file base64awaitclient.sendImageFromBase64('[email protected]',base64Image,"name file").then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send file (venom will take care of mime types, just need the path)// you can also upload an image using a valid HTTP protocolawaitclient.sendFile('[email protected]','path/to/file.pdf','file_name','See my file in pdf').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Sends file// base64 parameter should have mime type already definedawaitclient.sendFileFromBase64('[email protected]',base64PDF,'file_name.pdf','See my file in pdf').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Generates sticker from the provided animated gif image and sends it (Send image as animated sticker)// image path imageBase64 A valid gif and webp image is required. You can also send via http/https (http://www.website.com/img.gif)awaitclient.sendImageAsStickerGif('[email protected]','./image.gif').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Generates sticker from given image and sends it (Send Image As Sticker)// image path imageBase64 A valid png, jpg and webp image is required. You can also send via http/https (http://www.website.com/img.jpg)awaitclient.sendImageAsSticker('[email protected]','./image.jpg').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Forwards messagesawaitclient.forwardMessages('[email protected]',['[email protected]_B70847EE89E22D20FB86ECA0C1B11609','[email protected]_B70847EE89E22D20FB86ECA0C1B11777']).then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send @tagged messageawaitclient.sendMentioned('[email protected]','Hello @5218113130740 and @5218243160777!',['5218113130740','5218243160777']);// Reply to a messageawaitclient.reply('[email protected]','This is a reply!','[email protected]_7C22WHCB6DKYHJKQIEN9').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Send message with optionsawaitclient..sendMessageOptions('[email protected]','This is a reply!',{quotedMessageId: reply,}).then((retorno)=>{resp=retorno;}).catch((e)=>{console.log(e);});// Send gifawaitclient.sendVideoAsGif('[email protected]','path/to/video.mp4','video.gif','Gif image file');//checks and returns whether a message and a reply// exemple:// await client.onMessage(async (message) => {// console.log(await client.returnReply(message)); // replicated message// console.log(message.body ); //customer message// })checkReply=awaitclient.returnReply(messagem);// Send seen ✔️✔️awaitclient.sendSeen('[email protected]');// Start typing...awaitclient.startTyping('[email protected]');// Stop typingawaitclient.stopTyping('[email protected]');// Set chat state (0: Typing, 1: Recording, 2: Paused)awaitclient.setChatState('[email protected]',0|1|2);
Retrieving Data
// Retrieve all chatsconstchats=awaitclient.getAllChats();//Retrieves all chats new messagesconstchatsAllNew=getAllChatsNewMsg();//Retrieves all chats Contactsconstcontacts=awaitclient.getAllChatsContacts();//Retrieve all contacts new messagesconstcontactNewMsg=awaitclient.getChatContactNewMsg();// Retrieve all groups// you can pass the group id optional use, exemple: client.getAllChatsGroups('[email protected]')constchats=awaitclient.getAllChatsGroups();//Retrieve all groups new messagesconstgroupNewMsg=awaitclient.getChatGroupNewMsg();//Retrieves all chats Transmission listconsttransmission=awaitclient.getAllChatsTransmission();// Retrieve contactsconstcontacts=awaitclient.getAllContacts();// Returns a list of mute and non-mute users// "all" List all mutes// "toMute" List all silent chats// "noMute" List all chats without silenceconstlistMute=awaitclient.getListMute('all');// Retrieve the browser session token// if you want to delete the token file -> const browserSessionToken = await client.getSessionTokenBrowser(true);constbrowserSessionToken=awaitclient.getSessionTokenBrowser();// Calls your list of blocked contacts (returns an array)constgetBlockList=awaitclient.getBlockList();// Retrieve messages in chat//chatID chat id//includeMe will be by default true, if you do not want to pass false//includeNotifications will be by default true, if you do not want to pass false//const Messages = await client.getAllMessagesInChat(chatID, includeMe, includeNotifications)constMessages=awaitclient.getAllMessagesInChat('[email protected]');// Retrieve more chat messageconstmoreMessages=awaitclient.loadEarlierMessages('[email protected]');// Retrieve all messages in chatconstallMessages=awaitclient.loadAndGetAllMessagesInChat('[email protected]');// Retrieve contact statusconststatus=awaitclient.getStatus('[email protected]');// Retrieve user profileconstuser=awaitclient.getNumberProfile('[email protected]');// Retrieve all unread messageconstmessages=awaitclient.getAllUnreadMessages();// Retrieve profile fic (as url)consturl=awaitclient.getProfilePicFromServer('[email protected]');// Retrieve chat/conversationconstchat=awaitclient.getChat('[email protected]');// Check if the number existsconstchat=awaitclient.checkNumberStatus('[email protected]').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});
Group Functions
// groupId or chatId: leaveGroup [email protected]//change group descriptionawaitclient.setGroupDescription('[email protected]','group description').then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Leave groupawaitclient.leaveGroup('[email protected]');// Get group membersawaitclient.getGroupMembers('[email protected]');// Get group members idsawaitclient.getGroupMembersIds('[email protected]');// Generate group invite url linkawaitclient.getGroupInviteLink('[email protected]');// Create group (title, participants to add)awaitclient.createGroup('Group name',['[email protected]','[email protected]']);// Remove participantawaitclient.removeParticipant('[email protected]','[email protected]');// Add participantawaitclient.addParticipant('[email protected]','[email protected]');// Promote participant (Give admin privileges)awaitclient.promoteParticipant('[email protected]','[email protected]');// Demote particiapnt (Revoke admin privileges)awaitclient.demoteParticipant('[email protected]','[email protected]');// Get group adminsawaitclient.getGroupAdmins('[email protected]');// Return the group status, jid, description from it's invite linkawaitclient.getGroupInfoFromInviteLink(InviteCode);// Join a group using the group invite codeawaitclient.joinGroup(InviteCode);
Profile Functions
// Set client statusawaitclient.setProfileStatus('On vacations! ✈️');// Set client profile nameawaitclient.setProfileName('Venom bot');// Set client profile photoawaitclient.setProfilePic('path/to/image.jpg');// Get device infoawaitclient.getHostDevice();
Device Functions
// Disconnect from serviceawaitclient.logout();// Delete the Service Workerawaitclient.killServiceWorker();// Load the service againawaitclient.restartService();// Get connection stateawaitclient.getConnectionState();// Get battery levelawaitclient.getBatteryLevel();// Is connectedawaitclient.isConnected();// Get whatsapp web versionawaitclient.getWAVersion();
Events
//Listens to all new messages//To receiver or recipientclient.onAnyMessage(message=>{
...
};// Listen to messagesclient.onMessage(message=>{
...
})// Listen to state changesclient.onStateChange(state=>{
...
});// Listen to ack's// See the status of the message when sent.// When receiving the confirmation object, "ack" may return a number, look {@link AckType} for details:// -7 = MD_DOWNGRADE,// -6 = INACTIVE,// -5 = CONTENT_UNUPLOADABLE,// -4 = CONTENT_TOO_BIG,// -3 = CONTENT_GONE,// -2 = EXPIRED,// -1 = FAILED,// 0 = CLOCK,// 1 = SENT,// 2 = RECEIVED,// 3 = READ,// 4 = PLAYED =client.onAck(ack=>{
...
});// Listen to live location// chatId: '[email protected]'client.onLiveLocation("[email protected]",(liveLocation)=>{
...
});// chatId looks like this: '[email protected]'// Event interface is in here: https://github.com/s2click/venom/blob/master/src/api/model/participant-event.tsclient.onParticipantsChanged("[email protected]",(event)=>{
...
});// Listen when client has been added to a groupclient.onAddedToGroup(chatEvent=>{
...
});
Other
//Check if there is chatawaitclient.checkChat(chatId).then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Pin chat and Unpin chat messages with true or false// Pin chat, non-existent (optional)awaitclient.pinChat(chatId,true,false).then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});///mute a contactawaitclient.sendMute('[email protected]',//contact mute30,//duration of silence, example: 30 minutes'minutes'///kind of silence "hours" "minutes" "year").then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});///unmute contactawaitclient.sendMute('[email protected]'//contact unmute).then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Change the theme// string types "dark" or "light"awaitclient.setTheme('dark');// Receive the current theme// returns string light or darkawaitclient.getTheme();// Delete chatawaitclient.deleteChat('[email protected]');// Clear chat messagesawaitclient.clearChatMessages('[email protected]');// Archive and unarchive chat messages with true or falseawaitclient.archiveChat(chatId,true);// Delete message (last parameter: delete only locally)awaitclient.deleteMessage('[email protected]',['[email protected]_B70847EE89E22D20FB86ECA0C1B11609','[email protected]_B70847EE89E22D20FB86ECA0C1B11777']).then((result)=>{console.log('Result: ',result);//return object success}).catch((erro)=>{console.error('Error when sending: ',erro);//return object error});// Mark chat as not seen (returns true if it works)awaitclient.markUnseenMessage('[email protected]');// Blocks a user (returns true if it works)awaitclient.blockContact('[email protected]');// Unlocks contacts (returns true if it works)awaitclient.unblockContact('[email protected]');
Misc
There are some tricks for a better usage of venom.
Keep session alive:
// function to detect conflits and change status// Force it to keep the current session// Possible state values:// CONFLICT// CONNECTED// DEPRECATED_VERSION// OPENING// PAIRING// PROXYBLOCK// SMB_TOS_BLOCK// TIMEOUT// TOS_BLOCK// UNLAUNCHED// UNPAIRED// UNPAIRED_IDLEclient.onStateChange((state)=>{console.log('State changed: ',state);// force whatsapp take overif('CONFLICT'.includes(state))client.useHere();// detect disconnect on whatsappif('UNPAIRED'.includes(state))console.log('logout');});// DISCONNECTED// SYNCING// RESUMING// CONNECTEDlettime=0;client.onStreamChange((state)=>{console.log('State Connection Stream: '+state);clearTimeout(time);if(state==='DISCONNECTED'||state==='SYNCING'){time=setTimeout(()=>{client.close();},80000);}});// function to detect incoming callclient.onIncomingCall(async(call)=>{console.log(call);client.sendText(call.peerJid,"Sorry, I still can't answer calls");});
Closing (saving) sessions
Close the session properly to ensure the session is saved for the next time you
log in (So it won't ask for QR scan again). So instead of CTRL+C,
🕷Venom Bot🕸
Get started fast and easy! Official API!
Getting Started • Basic Function • Documentation
It's a high-performance alternative API to whatzapp, you can send, text messages, files, images, videos and more.
Remember, the API was developed on a platform called RESTful Web services, providing interoperability between computer systems on the Internet.
It uses a set of well-defined operations that apply to all information resources: HTTP itself defines a small set of operations, the most important being POST, GET, PUT and DELETE.
Use it in your favorite language like PHP, Python, C# and others. as long as your language is supported with the HTTP protocol, you will save time and money. you don't need to know how Venom works, we have the complete API documentation, in a professional way!
Get our official API Venom ! Contact us!
Venom group support on Telegram
Meet the Superchats
SuperChats is a premium library with unique features that control Whatsapp functions with socket.
With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp
Superchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide
https://github.com/orkestral/superchats
Buy a license Superchats
The value of the license is $50 monthly dollars, to acquire contact in whatsapp by clicking on the image below !!
🕷🕷 Functions Venom🕷🕷
Documentation at https://orkestral.github.io/venom/index.html
Installation
> npm i --save venom-bot
or for Nightly releases:
> npm i --save https://github.com/orkestral/venom/releases/download/nightly/venom-bot-nightly.tgz
Installing the current repository "you can download the beta version from the current repository!"
> npm i github:orkestral/venom
Getting started Multidevice and Normal
After executing
create()
function, venom will create an instance of whatsapp web. If you are not logged in, it will print a QR code in the terminal. Scan it with your phone and you are ready to go!Venom will remember the session so there is no need to authenticate everytime.
Multiples sessions can be created at the same time by pasing a session name to
create()
function:Optional create parameters
Venom
create()
method third parameter can have the following optional parameters:If you are using the
Linux
server do not forget to pass the args--user-agent
Original parameters in browserArgs
Callback Status Session
Gets the return if the session is
isLogged
ornotLogged
orbrowserClose
orqrReadSuccess
orqrReadFail
orautocloseCalled
ordesconnectedMobile
ordeleteToken
orchatsAvailable
ordeviceNotConnected
orserverWssNotConnected
ornoOpenBrowser
orinitBrowser
oropenBrowser
orconnectBrowserWs
orinitWhatsapp
orerroPageWhatsapp
orsuccessPageWhatsapp
orwaitForLogin
orwaitChat
orsuccessChat
orCreate session wss return "serverClose" case server for close
isLogged
notLogged
browserClose
qrReadSuccess
qrReadFail
autocloseCalled
desconnectedMobile
serverClose
deleteToken
client.getSessionTokenBrowser(true)
chatsAvailable
deviceNotConnected
(Trying to connect to the phone)
serverWssNotConnected
noOpenBrowser
initBrowser
openBrowser
connectBrowserWs
initWhatsapp
erroPageWhatsapp
successPageWhatsapp
waitForLogin
waitChat
successChat
Exporting QR Code
By default QR code will appear on the terminal. If you need to pass the QR
somewhere else heres how:
Downloading Files
Puppeteer takes care of the file downloading. The decryption is being done as
fast as possible (outruns native methods). Supports big files!
Basic Functions (usage)
Not every available function is listed, for further look, every function
available can be found in here and
here
Chatting
Here,
chatId
could be<phoneNumber>@c.us
or<phoneNumber>-<groupId>@g.us
Retrieving Data
Group Functions
Profile Functions
Device Functions
Events
Other
Misc
There are some tricks for a better usage of venom.
Keep session alive:
Closing (saving) sessions
Close the session properly to ensure the session is saved for the next time you
log in (So it won't ask for QR scan again). So instead of CTRL+C,
Auto closing unsynced sessions
The auto close is enabled by default and the timeout is set to 60 sec.
Receives the time in milliseconds to countdown until paired.
Use "autoClose: 0 | false" to disable auto closing.
Debugging
Development
Building venom is really simple altough it contains 3 main projects inside
> npm run build:wapi
> npm run build:venom
To build the entire project just run
> npm run build
Maintainers
Maintainers are needed, I cannot keep with all the updates by myself. If you are
interested please open a Pull Request.
Contributing
Pull requests are welcome. For major changes, please open an issue first to
discuss what you would like to change.
The text was updated successfully, but these errors were encountered: