Replica Chat API

Free partial implementation of https://chat-api.com

Known issues

  • accepting file from replica instance to odoo is not implemented
  • sending file from odoo to replica instance is not implemented

Configuration

  1. Create whatsapp account. It will be used as a bot
  2. Clone this repo and dependencies:
git clone https://github.com/itpp-labs/whatsapp-api.git
git clone https://github.com/itpp-labs/whatsapp-api-service.git
cd whatsapp-api-service
  1. Run:
docker-compose up -d firefox
  1. Using VNC client connect to 127.0.0.1:5900. Password is secret. Note, if you are running this on remote machine, consider to make SSH tunnel to that machine:
ssh -L 5900:127.0.0.1:5900 user@your_server
  1. In VNC client run:

    firefox -P

  2. Press Create Profile -> Next -> Enter any profile name -> Press Finish

  3. Choose new created profile and press Start Firefox

  4. In address bar enter https://web.whatsapp.com

  5. Scan QR code

  6. In address bar enter http://127.0.0.1:5000/admin

  7. Choose profile, that you have created some steps ago

  8. Press "Generate access token"

  9. Use this access token to access it's api

  10. In VNC client run to disable screen saver:

echo "xset -dpms s off" >> ~/.fluxbox/startup