- Sign up for a Free MessengerX.io Rapid API key
- Create a Free AI Character via https://portal.messengerx.io
- Follow the steps below to chat with your character via Telegram
- Go to Telegram apps and create an app
- You'll get an
App api_id
andApp api_hash
- Open the Telegram app and search for the
BotFather
bot - Start a chat with the BotFather and use the “/newbot” command to create a new bot
- Follow the instructions from the BotFather to choose a name and username for your bot
- Once the bot is created,
BotFather
will provide you with a uniqueBot token
for your bot. Make sure to keep this token safe, as it will be used to authenticate your bot when making API calls.
git clone https://github.com/machaao/telegram-ai-chatbot-sample
cd telegram-ai-chatbot-sample
pip install -r requirements.txt
nano -w .env
Put these key-value pairs in your .env file
RAPIDAPI_KEY=<RapidAPI Token>
BOT_TOKEN=<From Botfather>
API_ID=<App api_id>
API_HASH=<App api_hash>
BOT_NAME=jeanie
# Refer to the screenshot below to get your unique bot name / id via https://portal.messengerx.io
python main.py