Skip to content

lanseg/telegram-botapi-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker wrapper for the telegram-bot-api

Sources

Configuration

Environment variables:

  • API_ID
  • API_HASH
  • HTTP_PORT - on this port the bot api will listen for connections

There are many more configuration options, they could be used by creating your own docker image from this.

Directories and files:

  • /telegram-bot-api/files here bot api stores downloaded files and other working data
  • /telegram-bot-api/temp here bot api stores temporary http files

Examples

Checking the api keys and tokens

Basic example to validate api_hash, api_id and bot_token.

# Run bot api in the background
docker run -d -e API_HASH=<api_hash> -e API_ID=<api_id> -p 8081:8081 lanseg/telegram-bot-api

# Run basic client
curl "http://localhost:8081/bot<YOUR_BOT_TOKEN>/getMe"

And if all the keys are correct, you should get something like this:

{
    "ok": true,
    "result": {
        "id": 5133968151,
        "is_bot": true,
        "first_name": "chronist",
        "username": "chronist470529371_bot",
        "can_join_groups": true,
        "can_read_all_group_messages": true,
        "supports_inline_queries": false,
        "can_connect_to_business": false,
        "has_main_web_app": false
    }
}

About

Sources for the telegram bot api docker container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published