Skip to content
forked from idoco/intergram

Free live chat widget linked to your Telegram messenger

License

Notifications You must be signed in to change notification settings

AppsCDN/intergram

Repository files navigation

Intergram

Free live chat widget linked to your telegram messenger.

Embed Intergram in your website with these 2 simple steps

  1. Open Telegram, search for @Intergram and hit /start to get your unique chat ID.

  1. Paste this snippet right before the closing body tag of every page where you want the chat to appear (Don't forget to add your actual chat ID).
<script> window.intergramId = <Your unique chat ID> </script>
<script id="intergram" type="text/javascript" src="https://www.intergram.xyz/js/widget.js"></script>

Note: replying to a specific message should be used to respond to that specific visitor. Sending a standard message will broadcast to all connected chat clients (That might be easier if you have only one active conversation)

I have tried to keep the footprint as small as possible.

  • Preact
  • The widget injection script is about 5KB gziped and executes only after the host page finished loading ('onload' event).
  • The chat iframe will only be loaded if the user interacts with the chat widget (currently about 40KB gziped).

Deploy your own Intergram instance (The hard way)

  1. Talk to Telegram @BotFather, create a new bot and get its API Token.

  2. Deploy this repo to your own chat server.

  • Clone it locally and install or if you use Heroku, fork this repository and point the new app to it.
  • Set an .env varible named TELEGRAM_TOKEN with the value you got from @BotFather
  1. Point the bot webhook to your bot server by making a GET request to the following url https://api.telegram.org/bot<TOKEN>/setWebhook?url=<Server url>/hook (Don't forget to replace with your token and server url)

  2. Open a chat with your bot and hit /start to get your unique chat ID

  3. Embed this sinpet in your website

<script> 
  window.intergramId = <Your unique chat ID>
  window.intergramIFrameSrc = <Server url> + '/chat.html'
</script>
<script id="intergram" type="text/javascript" src="<Server url>/js/widget.js"></script>
  1. 🎉

About

Free live chat widget linked to your Telegram messenger

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 85.1%
  • CSS 9.8%
  • HTML 5.1%