To create a REST API with Rust that allows you to send photos and videos to a Telegram bot, we can use the Actix Web framework for the API and the Teloxide library for interacting with the Telegram bot.
Steps:
- Set up Actix Web to create the REST API.
- Use Teloxide to interact with the Telegram API for sending media.
- Use multipart form data to handle file uploads in the REST API.
Dependencies:
You will need the following dependencies in Cargo.toml
: