{"repo":"Rhymen/go-whatsapp","free":true,"listed":false,"github":"https://github.com/Rhymen/go-whatsapp","clone":"git clone https://github.com/Rhymen/go-whatsapp.git","description":"WhatsApp Web API","language":"Go","stars":2240,"topics":["whatsapp","whatsapp-web","reverse-engineering","golang","go"],"license":"MIT","category":"security-tools","readme_excerpt":"go-whatsapp Package rhymen/go-whatsapp implements the WhatsApp Web API to provide a clean interface for developers. Big thanks to all contributors of the sigalor/whatsapp-web-reveng project. The official WhatsApp Business API was released in August 2018. You can check it out here. Warning This package is not being actively maintained currently and will soon be unusable as WhatsApp updates to multi-device. Please look at tulir/whatsmeow for a Go WhatsApp Web API that is actively maintained and supports WhatsApp multi-device. Installation Usage Creating a connection The duration passed to the NewConn function is used to timeout login requests. If you have a bad internet connection use a higher timeout value. This function only creates a websocket connection, it does not handle authentication. Login The authentication process requires you to scan the qr code, that is send through the channel, with the device you are using whatsapp on. The session struct that is returned can be saved and used to restore the login without scanning the qr code again. The qr code has a ttl of 20 seconds and the login function throws a timeout err if the time has passed or any other request fails. Restore The restore function needs a valid session and returns the new session that was created. Add message handlers The message handlers are all optional, you don't need to implement anything but the error handler to implement the interface. The ImageMessage, VideoMessage, AudioMessage and DocumentMessage","default_branch":null,"files":null,"tree":[],"storefront":"/r/Rhymen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Rhymen/go-whatsapp/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}