Let tools act for you
A v2 key can read your data. With one tick it can also act for you.
Coming soon
Two abilities: read and act
A v2 key has two abilities. There are no scope names to pick from.
- Read - every keyed v2 read, for every code you own. Every v2 key has it.
- Act - the five actions below. A key has it only while Let tools act for me is ticked. The tick is off by default.
What the tick needs
- Two-factor authentication on your account. Without it the tick is greyed out.
- An account that is not staff. Staff accounts cannot let tools act for them.
- A daily limit. It starts at the default shown in the dialog and cannot go above the maximum shown there.
- A fresh two-factor code whenever you turn the tick on or raise the limit. Turning either down needs none.
You can set the tick when you switch, when you generate a new key, or later with Change acting. If the tick is off, every action answers 403 actions_not_enabled. If you remove two-factor authentication later, they answer 403 second_factor_required.
The daily limit
The limit is in coins and resets every day at 00:00 UTC. It counts the prize of every giveaway the key hosts. The other actions move no coins and count 0. It belongs to your account, not to one key, so a new key starts from what the account already spent today. Support can set a lower limit on an account. See Limits and idempotency for how it is counted.
The five actions
| Action | Request | Counts against the limit | At most a day |
|---|---|---|---|
| Host a giveaway | POST /api/v2/creators/{code}/giveaways | The prize | 10 |
| Schedule a leaderboard period | POST /api/v2/leaderboards/{code}/periods | Nothing | 20 |
| Remove a coming-up period | POST /api/v2/leaderboards/{code}/periods/{periodId}/remove | Nothing | 20 |
| Create a case | POST /api/v2/creators/{code}/cases | Nothing | 10 |
| Remove a case | POST /api/v2/creators/{code}/cases/{caseId}/remove | Nothing | 10 |
Each one has its own page in the API v2 reference with a request and a response in curl, JavaScript and Python. Every action needs an Idempotency-Key header.
The site's own rules still apply
An action does what the same step on the site does, under the same checks. Hosting a giveaway takes the prize from your real balance at once, and the site's refusals (a low balance, a block, self-exclusion, the giveaway rules) come back as 400 with the site's own reason. A period must start at least 5 minutes from now and uses one of the leaderboard configurations support approved for you. You can remove only your own coming-up periods and your own cases.
What the API can never do
Whatever the key and whatever the tick, a key cannot:
- join a giveaway
- claim anything
- redeem a promo code
- use coverage
- withdraw
- play
A key is also never a signed-in session: it passes no two-factor step, sets no cookie and reaches nothing that is for staff.
Calling actions
- Call them from your server or bot. Actions are not open to browsers and a cookie is refused.
- Send the key in the
x-apikeyheader only. A key in a URL or a body is never read. - If a key leaks, revoke it in Profile > Affiliates > API key. It is one click and asks for no code. An action from an address your account has not acted from in 30 days also sends you a notification, so a stranger's use shows quickly.