intergram icon indicating copy to clipboard operation
intergram copied to clipboard

Install InterGram

Open Ehsan-Np opened this issue 8 years ago • 13 comments

Hi! Can You Install intergram in my self host and self bot?

Ehsan-Np avatar Oct 06 '17 14:10 Ehsan-Np

Yes, there is a short guide in the readme file

It's easiest to deploy it to Heroku (because this is what I do), but you can also deploy it to your own server (You will need to setup an SSL certificate for it, set few environment variables and maybe to change few lines in server.js)

If you need help, you can email me to ido.mapchat at gmail dot com

idoco avatar Oct 07 '17 00:10 idoco

Hi I am unable to install. i guess there is some problem in code/node version. .

whatsapi@s002:~/intergram$ node server.js

/home/whatsapi/intergram/server.js:30 let replyText = reply.text || ""; ^^^^^^^^^ SyntaxError: Unexpected identifier at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3 whatsapi@s002:~/intergram$ node -v v0.10.29 whatsapi@s002:~/intergram$ npm -v 1.4.21 whatsapi@s002:~/intergram$

sah-anshu avatar Dec 06 '17 13:12 sah-anshu

Installation works with

  • node v8.6.0
  • npm 5.4.2 on mys side.

talaikis avatar Dec 06 '17 20:12 talaikis

Hey @sah-anshu , 'let' support was added in Node.js 4.x. are you using an older version?

idoco avatar Dec 06 '17 22:12 idoco

Thanks. I have achieved the things running by upgrading node and npm but i don't understand how can i attach hook to telegram, can't see any option like that.

Secondly. I see websocket error. pl find the screenshot. screen shot 2017-12-07 at 1 47 32 pm

Anshu

sah-anshu avatar Dec 07 '17 08:12 sah-anshu

You should follow readme instructions: "Deploy your own Intergram instance (Self Hosting)".

talaikis avatar Dec 07 '17 08:12 talaikis

I can see the 3rd point there:

  • 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 ur

But how & where to point that webhook. ie my question and i am stuck there.

Anshu

sah-anshu avatar Dec 07 '17 09:12 sah-anshu

Probably you need to configure and run chat server (server.js) under Nginx some subdomain and point that subdomain to Telegram API url. Or something like that, depends on how you will serve it.

talaikis avatar Dec 07 '17 10:12 talaikis

Ok. pl explain more. right now i am serving on the url http://whatsapi.in and it works . but next is configure webhook url in telegram bot. I want to know how to configure that.

Anshu

sah-anshu avatar Dec 07 '17 11:12 sah-anshu

You should follow all instructions. As I see, your page runs code with default chat ID. Start the Telegram bot and if your server is running and hook is enabled on Telegram side (via url) it will, the bot will show your own chat ID. If not, then your server isn't running or you didn't set a hook through url.

talaikis avatar Dec 07 '17 12:12 talaikis

Hi, I read your short install instructions. Could you elaborate more what exactly of the repo I should put in what folder hierarchy on my web server?

Clone it locally and install

Please elaborate "install"

Hg347 avatar Jun 23 '18 18:06 Hg347

Hi @Hg347, this means you should go to the cloned folder and run npm install from the terminal. (this is assuming you have node.js/npm install on your machine)

idoco avatar Jul 05 '18 08:07 idoco

GUYS CHECK HERE TO FIND OUT HOW TO SET THE TELEGRAM BOT! https://medium.com/@xabaras/setting-your-telegram-bot-webhook-the-easy-way-c7577b2d6f72

xunorus avatar Oct 03 '18 10:10 xunorus