https://github.com/aiogram/deta
Deta integration
https://github.com/aiogram/deta
Last synced: about 1 month ago
JSON representation
Deta integration
- Host: GitHub
- URL: https://github.com/aiogram/deta
- Owner: aiogram
- License: mit
- Archived: true
- Created: 2022-12-04T21:49:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-07T14:40:54.000Z (over 1 year ago)
- Last Synced: 2025-04-09T21:22:59.200Z (about 1 month ago)
- Language: Python
- Size: 35.2 KB
- Stars: 20
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aiogram on Deta.space
## Deployment Example
To get started, message @BotFather on Telegram to register your bot and receive its authentication
token (`BOT_TOKEN`). To secure your webhook endpoint, you will need a secret word (`WEBHOOK_SECRET`)Brief instructions:
- Create a new project using the [Space CLI](https://deta.space/docs/en/build/reference/cli) with the command ```space new```
- Then find out the ID of the created application on the site and use ```space link``` - this will connect your
local repository with the remote application
- Once you have tested it locally with the ```space dev``` command
you can start the process of installing the bot on the cloud using ```space push```[](https://deta.space/)
After that you can set webhook into new URL received from Deta, for example by using CURL:
```bash
curl -X POST https://api.telegram.org/bot/setWebhook \
-H "Content-Type: application/json" \
-d '{"url": "https://.deta.app/webhook", "secret_token": ""}'
```Congratulations! Now you have deployed Telegram Bot on Deta.space
To stop the webhook, run the following command:
```bash
curl -X POST https://api.telegram.org/bot/deleteWebhook \
-H "Content-Type: application/json"
```