How the API Works:
When you send a GET request to that URL, it responds with JSON data like this (example format):
{
"title": "joel Xmd starting messages",
"bot_name": "joel Xmd bot",
"creator": "joeljamestech",
"channel_link": "https://whatsapp.com/channel/0029Vak2PevK0IBh2pKJPp2K",
"channel_jid": "120363317462952356@newsletter",
"thumbnail": "https://raw.githubusercontent.com/joeljamestech2/JOEL-XMD/refs/heads/main/mydata/media/joelXbot.jpg",
"image": "https://raw.githubusercontent.com/joeljamestech2/JOEL-XMD/refs/heads/main/mydata/media/Xstarting.jpg",
"caption": "Today we recognize your dedication, patience, and hard work. We thank you for your continued trust and loyalty, we will continue to serve you."
}
Each Field Explained:
thumbnail: A small image (URL) used as a preview or logo inside the forwarded message's context info.
image: The main image that appears in the message body sent by the bot.
caption: The text shown below the image. It can use dynamic placeholders like ${config.MODE} or ${config.PREFIX}, which are replaced at runtime.
bot_name: The name shown in the forwarded newsletter section to make the bot's identity look official or branded.
title: The title displayed in the clickable preview (external ad reply).
creator: Used in the footer/body of the message to show who developed or powers the bot.
What the Bot Does with This:
-
Fetches the data from the API using axios.get().
-
Replaces placeholders in the caption dynamically (${config.MODE}, etc.).
-
Constructs a WhatsApp message using the fetched image and caption.
-
Sends the message to itself (Matrix.user.id) once connected, using Baileys.
This allows you to:
Update the bot's branding and greeting message remotely,
Use one API for multiple bots,
Avoid hardcoding visual or text content.