# All methods

Five methods, all `GET`, read only. Pass the key in the `Authorization: Bearer <key>` header.

API address: `https://api.donatty.com`

A key works only in its own environment: a key from the staging dashboard works with `https://api.staging.donatty.com`, a key from the production dashboard with `https://api.donatty.com`.

| Method | Key |
|---|---|
| [Streamer profile](https://developers.donatty.com/en/reference/streamer.md)<br>`GET /v1/streamer` | secret or public |
| [Donations](https://developers.donatty.com/en/reference/donations.md)<br>`GET /v1/donations` | secret only |
| [Fundraising goals](https://developers.donatty.com/en/reference/goals.md)<br>`GET /v1/goals` | secret or public |
| [Top donors](https://developers.donatty.com/en/reference/stats-top.md)<br>`GET /v1/stats/top` | secret or public |
| [Total donated](https://developers.donatty.com/en/reference/stats-total.md)<br>`GET /v1/stats/total` | secret or public |

Pages, money and time are in [Working with data](https://developers.donatty.com/en/data.md); response codes are in [Errors](https://developers.donatty.com/en/errors.md).

## Try a request

On a method page press “Try a request” and paste your key. In the request example, `YOUR_SECRET_TOKEN` stands for your key: secret or public, whichever the method accepts. The page does not store the key. The request example on a method page switches between Shell, Node.js, Python, PHP and Ruby.

The public key works from here only if `https://developers.donatty.com` is among its addresses.

## OpenAPI

[openapi.json](https://developers.donatty.com/openapi.json) describes every method. Its `servers` field holds the production address `https://api.donatty.com`: replace it for staging.
