1

I recently started using WhatsAppBusiness API, i am able to install the docker containers for whatsappbusiness and i am able to access whatsapp web using the port 9090. Ex: https://172.29.208.1:9090

But I don't know how to access MySQL and WhatsAppCore app.

I tried http://172.29.208.1:33060 but nothing is happened. Please let me know how to access MySQL and wacore.

Here is my docker-compose.yml file

docker-compose.yml

version: '3'

volumes:
  whatsappData:
    driver: local
  whatsappMedia:
    driver: local

services:
  db:
    image: mysql:5.7.22
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: testpass
      MYSQL_USER: testuser
      MYSQL_PASSWORD: testpass
    expose:
        - "33060"
    ports:
        - "33060:3306"
    network_mode: bridge
  wacore:
    image: docker.whatsapp.biz/coreapp:v2.19.4
    command: ["/opt/whatsapp/bin/wait_on_mysql.sh", "/opt/whatsapp/bin/launch_within_docker.sh"]
    volumes:
     - whatsappData:/usr/local/waent/data
     - whatsappMedia:/usr/local/wamedia
    env_file:
      - db.env
    depends_on:
      - "db"
    network_mode: bridge
    links:
      - db
  waweb:
    image: docker.whatsapp.biz/web:v2.19.4
    command: ["/opt/whatsapp/bin/wait_on_mysql.sh", "/opt/whatsapp/bin/launch_within_docker.sh"]
    ports:
     - "9090:443"
    volumes:
     - whatsappData:/usr/local/waent/data
     - whatsappMedia:/usr/local/wamedia
    env_file:
      - db.env
    environment:
      WACORE_HOSTNAME: wacore
    depends_on:
      - "db"
      - "wacore"
    links:
      - db
      - wacore
    network_mode: bridge
Manga Arun
  • 37
  • 1
  • 6

1 Answers1

1

Mysql is not a HTTP server, it doesn't understand http://172.29.208.1:33060

you could run 'docker ps | grep mysql' to get mysql container id

8dfa30ab0200 mysql:5.7.22 "docker-entrypoint.s…" 6 minutes ago Up 6 minutes 33060/tcp, 0.0.0.0:33060->3306/tcp xxxx_db_1

then run 'docker exec -it 8dfa30ab0200 mysql -h localhost -P 3306 -u testuser --password=testpass' to access mysql

But because you haven't registered, you won't see much stuffs in mysql. Please follow steps in https://developers.facebook.com/docs/whatsapp/api/account to perform registration.

You don't need to access coreapp directly, you perform all API requests through webapp (https://172.29.208.1:9090).

Weiyan Wang
  • 176
  • 1
  • 2
  • 1
    Thank you Weiyan for your answer. I have pulled phpmyadmin from dockerhub then i am able to access mysql database. WhatsApp account is not yet available in my facebook business manager.. that might be a reason for not able to access the wacore. – Manga Arun Aug 23 '18 at 04:39
  • @MangaArun are you able to add your number in your business manager by following the steps in the api/account document I provided? – Weiyan Wang Aug 23 '18 at 05:24
  • In my accounts section, WhatsApp account is not available. It is giving me the following message "This feature is gradually rolling out and may not be available to you right now." So i am not able to add phone number. – Manga Arun Aug 23 '18 at 05:56
  • @MangaArun yeah, please be patient, it may take some time for us to roll out to everyone – Weiyan Wang Aug 26 '18 at 02:15
  • Hi Weiyan wang, do you have the figure for the approximate cost to use Whatsapp Business API? – Joe. L Aug 27 '18 at 09:34
  • @Joe.L sorry I don’t have price information. All I know is that per message price depends on the country of message receiver. You could check out twilio’s whatsapp pricing page to get some ideas – Weiyan Wang Aug 31 '18 at 01:44
  • Ok, Thanks mate. For reference purpose: https://www.twilio.com/whatsapp/pricing/us – Joe. L Sep 04 '18 at 07:20
  • There is now publicly available pricing information from WhatsApp https://developers.facebook.com/docs/whatsapp/pricing – Andrew L Apr 29 '21 at 18:24