Skip to content

FAQ

The easiest way is the ready-made widgets from your dashboard. Your own overlay needs your server: it requests donations with the secret key and passes them to the overlay page. Don’t put the key itself into the page or OBS: anyone who opens the page will see it.

You can show a goal, top donors or a total without a server, with a public-key page. Add it to OBS as a Browser source: website quick start.

Why didn’t my test donation show up in the API?

Section titled “Why didn’t my test donation show up in the API?”

«Тест на стриме» (Test on stream) in your dashboard only shows an alert: it creates no donation, so the API doesn’t have one. You can test your bot only with a real donation.

To check that your key and request work, you don’t need a donation: a response with status 200 is enough, even with an empty list.

Nothing matched your request: there are no donations or goals yet, or your moderation, since, source or status filters left them out. "items": [] with status 200 is a successful response, and your key is fine.

Remove the filters and try again. Test donations never appear in the list: here’s why.

Why did my bot show a donation I rejected?

Section titled “Why did my bot show a donation I rejected?”

The API returns all donations, including ones rejected by moderation, and your widget filters don’t apply to it. Your bot decides what to show: show donations with no moderation (NONE) and ones that passed it (PASSED), and re-check those waiting for a decision (PENDING) until the status changes. The status is in moderation.status.

The ready-made bots in Node.js and Python do exactly that. More: which donations to show on stream.

No, the API has no webhooks: your bot finds out about new donations when it requests them. If the response fits on one page, one request every 5 seconds is 12 requests a minute, with a limit of 600.

The ready-made bots in Node.js and Python work this way. They also re-check donations that are waiting for moderation.

Why does the browser say CORS or Failed to fetch?

Section titled “Why does the browser say CORS or Failed to fetch?”

Most likely your page’s address isn’t in the public key’s address list. The browser doesn’t show the API’s origin_not_allowed response to the page, only a network error.

In your dashboard, click «Настроить ключ» (Configure key) next to the public key and add the address exactly as it appears in the address bar: protocol, domain and port. A page opened from a file won’t work: it needs an http:// or https:// address. More on the origin_not_allowed error page.

If the key worked and then stopped, it most likely expired: the response has the token_expired code. Keys can’t be extended. Issue a new key, put it in your bot and delete the old one: how to replace a key.

If the response has invalid_token, the key was deleted, copied only in part, or the request still has the placeholder from an example, such as dnt_pat_....

What if someone else has seen my secret key?

Section titled “What if someone else has seen my secret key?”

Issue a new key and delete the old one right away: deletion takes effect within a minute. Then put the new key in your bot. More: Keys.

You don’t need to hide the public key: website visitors can see it anyway, and it reads only your profile, goals and stats.

With secret keys, up to 600 requests a minute for all keys together. With the public key, up to 60 requests a minute from one IP address and up to 600 a minute from all addresses together.

One request every 30 seconds is two requests a minute per open page. All pages share the limit of 600; pages with the same IP address also share the limit of 60. When the limit runs out, you get a 429 response: what to do.

Why is the goal amount different from the widget?

Section titled “Why is the goal amount different from the widget?”

The API counts the amount raised (raised) as the amount you started the goal with (the «Начать сбор с» (Start collecting from) field) plus every Donatty donation to the goal, including ones rejected by moderation. It doesn’t count Donation Alerts goals or widget settings. More: Working with data.

Do Donation Alerts donations come through?

Section titled “Do Donation Alerts donations come through?”

Yes, if Donation Alerts is connected in your dashboard under «Подключённые аккаунты» (Connected accounts) and you have the PRO subscription. These donations have source set to DONATION_ALERTS. Twitch subscriptions and bits aren’t in the API.

Any language that can send HTTP requests. There are ready-made bots in Node.js and Python, and the request example on every method page switches between Shell, Node.js, Python, PHP and Ruby.

Yes, with their key: a key gives access only to the channel it was issued for. If you’re building a bot for another streamer, ask them to issue a secret key in their dashboard and put it into the bot’s settings. There is no “Sign in with Donatty” (OAuth) for third-party services.

The donor didn’t enter a name. A Donatty donation then has donorName set to Anonymous; it’s never empty. If you’d rather show something else, replace this value in your code.

Can I withdraw money or change data through the API?

Section titled “Can I withdraw money or change data through the API?”

No. The API only reads data: it has no balance and no withdrawals. You can withdraw money in your dashboard with «Вывести средства» (Withdraw funds).