Documentation Index
Fetch the complete documentation index at: https://docs.airys.chat/llms.txt
Use this file to discover all available pages before exploring further.
Setup Telegram app integration on your local machine
Please follow the steps if you are trying to work with the Telegram integration on your local machine.Prerequisites
- Telegram Bot Token from BotFather
- Ngrok or similar tunneling service
- Running AirysChat development environment
Setup Steps
1. Start Ngrok Server
Start a Ngrok server listening at port3000 or the port you will be running the AirysChat installation:
2. Update Environment Variables
Update the.env variable FRONTEND_URL in AirysChat with the https version of the Ngrok URL:
3. Start AirysChat Server
Start the AirysChat server and create a new Telegram channel with the token obtained from Telegram BotFather.4. Create Telegram Channel
- Access AirysChat: Go to your AirysChat instance (http://localhost:3000)
- Navigate to Settings → Inboxes → Add Inbox
- Select Telegram as the channel type
- Enter Bot Token: Paste the token you received from BotFather
- Configure Channel: Set up the channel name and other settings
Verify Webhook Registration
While creating the channel, AirysChat should have registered a webhook callback URL in Telegram for your Bot. You can verify whether this URL registration was done successfully by calling the Telegram API:Testing the Integration
If the webhook is registered correctly with Telegram, your Ngrok server should receive events for new Telegram messages, and new conversations will be created in AirysChat.Test Steps
- Send a message to your Telegram bot
- Check Ngrok logs to see if the webhook request is received
- Check AirysChat to see if a new conversation is created
- Reply from AirysChat to test bidirectional communication
Troubleshooting
Webhook not registered
Webhook not registered
Problem: Telegram webhook registration failsSolution:
- Ensure your Ngrok URL is accessible publicly
- Check that
FRONTEND_URLis set correctly in your.envfile - Verify the bot token is correct
- Restart AirysChat after updating environment variables
Messages not appearing in AirysChat
Messages not appearing in AirysChat
Problem: Telegram messages don’t create conversations in AirysChatSolution:
- Check Ngrok logs for incoming webhook requests
- Verify the webhook URL in Telegram using the API call above
- Check AirysChat logs for any error messages
- Ensure the channel is properly configured and enabled
SSL/TLS errors
SSL/TLS errors
Problem: SSL certificate issues with webhookSolution:
- Use the
httpsversion of your Ngrok URL - Ensure Ngrok is running properly
- Try restarting Ngrok and updating the webhook
Next Steps
After successful setup:- Test message flow between Telegram and AirysChat
- Configure agent assignments for Telegram conversations
- Set up automated responses if needed
- Review webhook logs for debugging
Getting Help
If you encounter issues:- Check Logs: Review both AirysChat and Ngrok logs
- Telegram Bot API: Official Documentation
- Common Errors: See Common Errors
- Community Support: Discord
Your Telegram integration is now ready for development and testing! 📱