Bot or server
Request your channel’s latest donations from a macOS, Linux or Windows terminal.
1. Issue a secret key
Section titled “1. Issue a secret key”In the «Секретные ключи» (Secret keys) block, press «Выпустить секретный ключ» (Issue secret key). Enter a name, tick «Донаты» (Donations, donations:read), choose a lifetime and press «Выпустить ключ» (Issue key). Copy the key right away: we show it once.
2. Save the key in a variable
Section titled “2. Save the key in a variable”Replace dnt_pat_... with your secret key and run the command in your terminal.
export DONATTY_TOKEN="dnt_pat_..."$env:DONATTY_TOKEN = "dnt_pat_..."The variable lasts while the terminal window is open. In a new window, set it again.
3. Request donations
Section titled “3. Request donations”curl -s "https://api.donatty.com/v1/donations?limit=5&moderation=PASSED,NONE" \ -H "Authorization: Bearer $DONATTY_TOKEN"curl.exe -s "https://api.donatty.com/v1/donations?limit=5&moderation=PASSED,NONE" ` -H "Authorization: Bearer $env:DONATTY_TOKEN"{ "items": [ { "id": "don_5d2e8f31-6a47-4c19-9b0e-7f3a2d1c8e46", "createdAt": "2026-11-09T10:21:47Z", "source": "DONATTY", "donorName": "Алексей", "message": "Спасибо за стрим!", "amount": {"value": "500.00", "currency": "RUB"}, "feeCompensation": {"value": "27.00", "currency": "RUB"}, "paymentMethod": "CARD", "goal": null, "moderation": {"status": "PASSED", "deadline": null}, "media": null }, { "id": "don_9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d", "createdAt": "2026-11-09T09:58:00Z", "source": "DONATION_ALERTS", "donorName": "Maria", "message": "Hi from Donation Alerts", "amount": {"value": "5.00", "currency": "USD"}, "feeCompensation": null, "paymentMethod": null, "goal": null, "moderation": {"status": "NONE", "deadline": null}, "media": null } ], "nextCursor": null}An empty items means there are no donations to show on stream yet.
amount is the base amount of the donation. If the donor paid extra to cover the fee, that extra is in feeCompensation, in the same currency; otherwise it is null. How the donor paid is in paymentMethod: SBP for the Faster Payments System, CARD for everything else, null for Donation Alerts donations.
What to show on stream
Section titled “What to show on stream”| Status | What to do |
|---|---|
NONE |
show: no moderation |
PASSED |
show: moderation let it through |
PENDING |
read again after moderation.deadline |
BLOCKED |
do not show |
- A complete bot: Node.js or Python. It rechecks
PENDINGand waits after 429. - Donations method parameters
- Errors