/

Donatty updates

Donatty public API: your own bot for tips and goals

Your channel's tips, goals and tipper leaderboard can now be pulled into your own program: a bot, your website or another service. Here is what you can build and where to start.

Yuri Mediakov

Product Manager at Donatty

Published:

Donatty has released a public API

We have released the Donatty public API. Now your channel's tips, goals and tipper leaderboard can be pulled into your own program: a bot, your website or another service. The video covers everything in a minute; the details are below.

A bot for tips and goals

Build yourself a bot: it will post about new tips, goals and the tipper leaderboard in Telegram or wherever you like.

The documentation has a ready-made bot in Node.js and Python. Every 5 seconds it fetches new tips and keeps only those that passed moderation or did not need it. Rejected tips will not be shown.

A goal widget on your website

Show on your page how much has already been raised for a goal. The ready-made goal page is a single HTML file: it shows the goal name, the amount raised and a progress bar, and the data refreshes every 30 seconds. You can also add such a page to OBS as a “Browser” source.

Besides the goal, your site can show the tipper leaderboard or the total of tips for a period.

Connecting another service

Tips, goals and the leaderboard can be passed to any service you use. For example, a smart lamp lights up when a tip arrives.

What data the API exposes

  • tips — all of them, from newest to oldest, with the moderation status;

  • fundraising goals — the name, the target and the amount raised;

  • tipper leaderboard for a day, week, month, year or all time;

  • total tips for a period;

  • profile — nickname, avatar and a link to your tipping page.

The API is read-only: you cannot withdraw money or change anything through it. A key opens only your own channel's data.

Where to start

  1. Issue a key in your dashboard, in the “For developers” section. For a bot or a server, use a secret key: when you issue it, you choose what it is allowed to read. For a website, use a public key: it opens only the profile, goals and statistics and does not read tips.

  2. Take a ready-made example from the documentation: a bot in Node.js or Python, or a fundraising goal page.

  3. For your own idea, start with the quick start — for a bot or for a website. Request examples are on the documentation home page, and on each method's page the example switches between Shell, Node.js, Python, PHP and Ruby.

We show the secret key value only once — copy it right away.

Coming soon: WebSocket and OAuth

WebSocket API and OAuth for app developers are in development. We plan to release them soon.

Documentation

Keys, methods, errors, limits and the FAQ — at developers.donatty.com.

Sign up and start receiving tips

Sign up and start receiving tips

Sign up and start receiving tips

Customize your tipping page, show tip alerts on your stream, and withdraw money to your bank card.

Customize your tipping page, show tip alerts on your stream, and withdraw money to your bank card.

Login Screenshot