8b1e29c2e6bf4c6726ca828918460c7bebe1befb
WhatsApp HTTP API
WhatsApp HTTP API that you can configure in a click!
Quickstart
Environment variables
Common
DEBUG- show debug and verbose logs, set in any valueWHATSAPP_API_PORT- listen port for HTTP server (default:3000)WHATSAPP_API_HOSTNAME- Hostname for HTTP server (default:localhost)
Webhooks
https://github.com/orkestral/venom#events All webhooks are disabled by default.
WHATSAPP_HOOK_ONMESSAGE=http://localhost/uriWHATSAPP_HOOK_ONSTATECHANGE=http://localhost/uriWHATSAPP_HOOK_ONACK=http://localhost/uriWHATSAPP_HOOK_ONADDEDTOGROUP=http://localhost/uri
File storage
WHATSAPP_FILES_FOLDER- folder where will be stored files from chats (images, voice messages) (default:/tmp/whatsapp-files)WHATSAPP_FILES_MIMETYPES- download only these mimetypes from messages. Mimetypes must be separated by comma, without spaces:audio,image/png,image/gif. In order to choose type use prefix (likeaudio,image). Disabled by default,message.clientUrlwill be equal emtpy string"".WHATSAPP_FILES_LIFETIME- to keep free space files will be removed after this time (default:180, in seconds)
Installation
docker pull ...
Development
$ npm install
Running the app
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Test
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Languages
TypeScript
63.5%
JavaScript
31.5%
HTML
4.6%
Dockerfile
0.2%