The post has been translated automatically. Original language: Russian
Yes, it is free - now you can not pay integration services for the ability to receive and send messages between Bitrix24 CRM and WhatsApp.
I am glad to present to your attention my open source project - thoth (https://github.com/vaestvita/thoth )
The integration works on the basis of the official WhatsApp Business API (WABA)
- Server (LInux, Windows). Min. 512 Mb RAM
- Python > 3.10
- A domain name with an SSL certificate (thoth.example.kz ). This is desirable, but not necessary. You can limit yourself to the IP address at which the thoth portal will be available
- Facebook account without bans and locks
- Phone number unlinked from WhatsApp
The first step is to install thoth on your server.
cd /opt
git clone https://github.com/vaestvita/thoth
cd thoth
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements/production.txt
cp docs/example/env_example .env
nano .env
replace ALLOWED_HOSTS, CSRF_TRUSTED_ORIGINS with their own values
python manage.py migrate
python manage.py collectstatic
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:8000 (for testing and debugging)
After starting the server in the file .An ADMIN_URL will be created, which must be used to log in to the admin panel.
Next, we proceed to connecting your Bitrix24 to thoth.
Video Instruction - https://youtu.be/ti99AeGAr4k
Create a token in the admin panel

- In the Sites section, rename example.com the domain for which thoth will be available
- Bitrix > Apps - Add App. Fill in the name (waba), select the domain, set the checkbox "Connector", Copy the received Id
- In Bitrix24, create a server–side local application without an interface (Applications for Developers – Another – Local application) in Bitrix24 and fill in the appropriate fields (the path of your handler and the Path for initial installation). Required rights (Setting up rights): crm, imopenlines, contact_center, user, messageservice, im, imconnector, disk.
the URL is processed
https://example.kz/api/bitrix/?api-key=XXXXXXX installation url https://example.kz/api/bitrix/?api-key=XXXXXXX&app-id=YYYYYYY
XXXXXXX - your token
YYYYYYY - the application ID from the previous step
- Copy the "Application code" (client_id) and the "Application key" (client_secret) to Bitrix > Apps is your application. They were issued by Bitrix in the previous step when installing the local application
- In Bitrix, the "THOTH WABA" connector should appear in the "contact center" section as in the title picture
Bitrix is ready, let's move on to setting up WABA
Video instruction https://youtu.be/cSirpfq5rPQ
- Create an application on the developer portal
- In the panel, connect Webhooks, WhatsApp products
- In the admin panel, THOTH - WABA - Add waba (Access token - Permanent or temporary token, Verify token - copy)
- On the developer portal - Quickstart > Configuration >
- Callback URL - https://example.kz/api/waba/?api-key=XXXXXXX (XXXXXXX is your thoth token)
- Verify token - Verify token from the previous step

- In the admin panel, thoth - waba - phones and add numbers (Phone number, Phone id - id from the Facebook application). Select a waba object that was created earlier
- Select the App instance (Bitrix portal) to which to link the waba number
- if everything goes well, then the connector in the Bitrix24 contact center will turn green and an open line will be attached to it
That's it!
And remember that when using WABA first, you can only write template messages that have been pre-approved by Facebook moderators.
Good luck with integration, and if you need help, write to telegram @antgulin
Да, именно бесплатная - теперь можно не платить сервисам интеграции за возможность приёма и отправки сообщений между CRM Bitrix24 и WhatsApp.
Рад представить вашему вниманию мой open source проект - thoth (https://github.com/vaestvita/thoth)
Интеграция работает на базе официального WhatsApp Business API (WABA)
- Сервер (LInux, Windows). Мин. 512 Mb RAM
- Python > 3.10
- Доменное имя с SSL сертификатом (thoth.example.kz). Это желательно, но не обязательно. Можно ограничиться IP адресом по которому будет доступен портал thoth
- Аккаунт Facebook без банов и блокировок
- Номер телефона, отвязанный от WhatsApp
Первый делом необходимо установить thoth (тот) на ваш сервер.
cd /opt
git clone https://github.com/vaestvita/thoth
cd thoth
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements/production.txt
cp docs/example/env_example .env
nano .env
заменить ALLOWED_HOSTS, CSRF_TRUSTED_ORIGINS на свои значения
python manage.py migrate
python manage.py collectstatic
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:8000 (для тестирования и отладки)
После запуска сервера в файле .env будет создан ADMIN_URL, который необходимо исопльзовать для входа в админку.
Далее переходим к подключению вашего Битрикс24 к thoth.
Видеоинструкция - https://youtu.be/ti99AeGAr4k
В админке созадем токен

- В разделе Sites переименуйте example.com в домен по котрому будет доступен thoth
- Bitrix > Apps - Add App. Заполнить имя (waba), выбрать домен, установить чекбокс "Connector", Скопировать полученный Id
- В Битрикс24 создайте серверное локальное приложение без интерфейса (Приложения – Разработчикам – Другое – Локальное приложение) в Битрикс24 и заполните соответствующие поля (Путь вашего обработчика и Путь для первоначальной установки). Необходимые права (Настройка прав): crm, imopenlines, contact_center, user, messageservice, im, imconnector, disk.
url обработчка https://example.kz/api/bitrix/?api-key=XXXXXXX
url установки https://example.kz/api/bitrix/?api-key=XXXXXXX&app-id=YYYYYYY
XXXXXXX - ваш токен
YYYYYYY - id приложения из предыдущего шага
- "Код приложения" (client_id) и "Ключ приложения" (client_secret) копируем в Bitrix > Apps - ваше приложение. Они были выданы Битриксом в предыдущем шаге при установке локального приложения
- В битриксе в разделе "контакт-центр" должны появиться коннектор "THOTH WABA" как на заглавной картинке
Битрикс готов, переходим к настройке WABA
Видеоинструкция https://youtu.be/cSirpfq5rPQ
- Создайте приложение на портале разработчиков
- В панели подключите продукты Webhooks, WhatsApp
- В админке THOTH - WABA - Add waba (Access token - Постоянный или временный маркер, Verify token - скопируйте)
- На портале разработчиков - Quickstart > Configuration >
- Callback URL - https://example.kz/api/waba/?api-key=XXXXXXX (XXXXXXX - ваш токен thoth)
- Verify token - Verify token из предыдущего шага

- В админке thoth - waba - phones и добавляем номера (Phone - номер, Phone id - id из приложения фейсбук). Выбрать объект waba, созданный ранее
- Выбрать App instance (портал битрикс) к котрому привязать номер waba
- если все пройдет успешно, то в контакт центре Битрикс24 коннектор станет зеленым и к нему будет прикрпелена открытая линия
На этом всё!
И помните, что при использовании WABA первыми вы можете писать только шаблонными сообщениями, предварительно одобренными модераторами Facebook.
Успехов в интеграции, а если понадобится помощь пишите в телеграм @antgulin