![]() ![]() Moving a bot from one local server to another ![]() If the server is launched in -local mode, make sure that the bot can correctly handle absolute file paths in response to getFile requests. To guarantee that your bot will receive all updates, you must deregister it with the server by calling the method logOut.Īfter the bot is logged out, you can replace the address to which the bot sends requests with the address of your local server and use it in the usual way. Subscribe to to be the first to know about the latest updates and join the discussion in a bot to a local server See the Telegram Bot API server build instructions generator for detailed instructions on how to build the Telegram Bot API server. See the Telegram Bot API documentation for a description of the Bot API interface and a complete list of available classes, methods and updates. See Bots: An introduction for developers for a brief description of Telegram Bots and their features. The Telegram Bot API server accepts only HTTP requests, so a TLS termination proxy needs to be used to handle remote HTTPS requests.īy default the Telegram Bot API server is launched on the port 8081, which can be changed using the option -http-port. Receive the absolute local path as a value of the file_path field without the need to download the file after a getFile request.Set max_webhook_connections up to 100000.Use any local IP address for the webhook.Upload files using their local path and the file URI scheme. ![]() In the local mode the Bot API server allows to: To enable Bot API features not available at, specify the option -local. Or the TELEGRAM_API_ID and TELEGRAM_API_HASH environment variables. You must obtain your own api_id and api_hashĪs described in and specify them using the -api-id and -api-hash options The only mandatory options are -api-id and -api-hash. Use telegram-bot-api -help to receive the list of all available options of the Telegram Bot API server. ![]() To build and run Telegram Bot API server you will need: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |