Log in
Exchange an address and a password for a token. The token is named after device_name, so you can tell your integrations apart later and revoke one without touching the rest.
A user who has turned on two factor authentication must send a valid code as well, from their authenticator app or from their recovery codes. No token is issued until it passes, because an endpoint that skipped it would be a way around the second factor rather than another way in.
Wrong password, suspended account, an account that signs in through an external provider, and an address nobody holds all answer the same way. Anything else would tell somebody which addresses have accounts here.
Body parameters
Sent as JSON. Anything not listed here is ignored.
The address the account signs in with.
The password of the account.
A code from the authenticator app, or one of the recovery codes. Required when the user has two factor authentication turned on. A recovery code is spent the moment it works.
What the token is for, in a few words. Shown in security settings.
Returns
A token, in plain text, or a 401 status when anything at all was wrong with the credentials.
The bearer token. Send it as an Authorization header reading Bearer followed by this value, on every other endpoint. This is the only time it exists in readable form: only a hash of it is kept, so a token you fail to copy has to be made again.
When the token stops working, as a count of seconds, or null when it never does. Every token issued today is null: expiry is not something this API sets yet, and a token is ended by revoking it.
Rate limit
Six requests per minute, per address. Every answer carries the budget left in X-RateLimit-Remaining.
Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.