Skip to content

yacinelakel/project-lurch

Repository files navigation

Under Construction

project-lurch

An api for integrating towards different bot-systems.

Currently the api can connect to a telgram bot using telegrams webhook functionality.

Development

Use Ngrok to create a public url

In order to connect a telegram bot using a webhook, you will need a public url with ssl. Ngrok is a tool that binds a generated public url given from ngrok to your local host.

Run the following command to create a public url that binds to localhost:8443.

ngrok http -host-header="localhost:8443" 8443

Note that the flag -host-header is required if you are using IISExpress. (source)

Bind the public url to the telegram webhook

Once you run your ngrok command, it will generate a public url that are forwarded to your localhost.

Copy the url starting with https.

To bind a url to the telegram webhook, run the following:

curl -F “url=https://<<NGROK_URL>>/<WEBHOOKLOCATION>" https://api.telegram.org/bot<YOURTOKEN>/setWebhook

(source)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages