Launch Zoom Meeting Automatically from Telegram Bot
--
In this tutorial, I will show you how you can write a code to launch the Zoom meeting automatically from Telegram Bot. It is very useful, at least for my case, to communicate with my elderly parents who don’t know how to operate Zoom, create a meeting, etc. In this situation, I just click a button on my Telegram bot on my phone and the Zoom meeting session is automatically launched on my parents’ tablet and I can immediately communicate with them. I am utilising the kiosk browser to turn on and off the tablet screen, so it will turn on the screen when the meeting session starts and off the screen when the meeting finishes.
I know it sounds creepy and breaks the privacy issue, but I use this again to communicate with others who don’t know how to use Zoom. The other good thing is that you can share the meeting URL with others so they can join together.
Take note that this app will only work on the Android OS at the moment. I have tested on my Samsung Galaxy S6 with Android version 11.
Components to Prepare
- Telegram Bot ID and Token
- Zoom JWT API Key and Secret
- termux (termux, termux:boot, termux:float)
- NodeJS Telegram Bot App
- Fully Kiosk Browser
Telegram Bot ID and Token
Install the Telegram client on your mobile phone and use the Type botfather to search for the BotFather from the Telegram Web. We will get the bot token and id.
Type/newbot
command to create a new bot. Give a name and username for your bot. Take note of the access token that was generated.
Now we need to get the bot id. Install the node-telegram-bot-api,
pkg install nodejsnpm install -g node-telegram-bot-api jsonwebtoken request-promise node-telegram-bot-api child_process opsnpm link jsonwebtoken request-promise node-telegram-bot-api child_process ops node-telegram-bot-api
https://wiki.termux.com/index.php?title=Node.js&mobileaction=toggle_view_mobile
Create a file called telegrambot.js and insert the following code:
Replace the YOUR_TELEGRAM_BOT_TOKEN with the token you get from the earlier step and run the code.
node telegrambot.js
Search for the bot you created and type /echo, the bot will reply with the bot id information.
Zoom JWT API Key and Secret
Create a Zoom account and navigate to https://marketplace.zoom.us/develop/create and choose app type JWT and click Create.
Give the app a name, ZoomBot for example and click Create.
Fill in the necessary information for your bot and select the App Credentials and take note of the API Key and API Secret.
Termux
Install Termux on your Android tablet. Once you have installed, run the SSH server so you can remotely access from your computer.
On termux command prompt, type sshd. You may want to change the password of the current user name so you can logon remotely via SSH.
To logon remotely, type:
ssh -p 8022 <Tablet_IP_Address>
For further information, please refer to https://wiki.termux.com/wiki/Remote_Access
We will host the NodeJS app in the termux environment on the Android Tablet.
NodeJS Telegram Bot App
Now we need to write a NodeJS app, bot.js to handle the user interaction via a Telegram Bot that we created earlier.
Get the source code from https://github.com/ferrygun/ZoomTelegramBot/blob/main/bot.js and update the following constants.
The bot.js should reside in the termux environment on your tablet.
Termux:Boot
Install Termux:Boot to run the bot.js under temux when the tablet boots up.
Create the ~/.termux/boot/ directory and create a script start.sh.
start.sh
insert the following line to execute the NodeJS bot.js app.
/data/data/com.termux/files/usr/bin/node /data/data/com.termux/files/home/zoom-api-jwt/bot.js
The script start.sh will execute the NodeJS bot.js when the tablet boots up.
Termux:Float
We will install Termux:Float to ensure the bot.js is always running on the background.
Fully Kiosk Browser
Finally we need to install the Fully Kiosk Browser App https://www.fully-kiosk.com and configure the setup.
Remote Administration
Enable the remote administration, set the Remote Admin Password and Remote Admin from Local Network. This is to turn on and off the tablet screen.
If you update the password other than “123”, please update the bot.js code accordingly under function screenOnOff().
The last step we need to do is to change the tablet screen timeout to 15 seconds.
Usage
On your phone, find the telegram bot you created, and you want to launch the Zoom meeting on the tablet.
Click on the Initiate Call to start the meeting and click Terminate Call to end the meeting.