requilence / integram

Integrate Telegram into your workflow – Trello, Gitlab, Bitbucket and other bots
https://integram.org
GNU General Public License v3.0
1.54k stars 151 forks source link

[Question] Got Bot up and running but having oauth issue #21

Closed bosslee closed 7 years ago

bosslee commented 7 years ago

Hi there

I have managed to get the bot up and running on an EC2 instance.

[GIN-debug] Listening and serving HTTP on :7000
INFO[0002] Start listening for updates bot ahleeTestbot 
trello msg: start 

When I trigger the bot with /start I got redirected to this link

http://ec2-52-221-237-194.ap-southeast-1.compute.amazonaws.com/oauth1/skenwwcrlhd4w8k-

Where ec2-52-221-237-194.ap-southeast-1.compute.amazonaws.com is my based url However, the page can't be open.

2017-01-21 at 2 57 pm

found AuthTempToken:skenwwcrlhd4w8k-
DEBU[0013] beforeJob 865EKu0unycvVGOGba5q0dr9hqzk, poolID:02:95:d3:2d:b4:89_telegram, finished:0

DEBU[0014] Successfully sent, id=19

DEBU[0014] afterJob 865EKu0unycvVGOGba5q0dr9hqzk, poolID:02:95:d3:2d:b4:89_telegram, finished:1484981506

DEBU[0014] destroying the job 865EKu0unycvVGOGba5q0dr9hqzk finished(2017-01-21 06:51:46.732318468 +0000 UTC), status=executing, retriesLeft=23, nextTime=0 

Am I missing something here?

Thank you @Requilence :)

requilence commented 7 years ago

You need to set environment variable INTEGRAM_PORT to 80 for http, or 443 to listen on HTTPS (you will need to put integram.crt and integram.key in the directory of main.go)

bosslee commented 7 years ago

Hi @Requilence

Thanks but when I set it to PORT 80 I got the following

[GIN-debug] Listening and serving HTTP on :80
[GIN-debug] [ERROR] listen tcp :80: bind: permission denied
requilence commented 7 years ago

On mac os you need application to run with sudo to be able to bind on ports <1000.

As a useful solution to run on local environment I can recommend https://ngrok.com or https://github.com/beameio/beame-insta-ssl. E.g. you will be able to tunnel https://external_address.com to 127.0.0.1:7000

bosslee commented 7 years ago

thank you