Documentation · API reference
POST/api/v1/auth/login

Email and password sign-in

Email and password sign-in. Hosted (`signup`) only.

What to send

Login

email
stringneeded
password
stringneeded
second
string or nullThe six digits of the second step, when the member has one.

The answer

Status 200

Me

account_id
stringneeded
account_name
stringneeded
accounts
list of MeAccountEvery account they are in. One is the account this answer is about; a person in one account has one here.
email
stringneeded
features
FeatureSetneeded
invite_needed
booleanAnother account of theirs needs an invite code (doc/invites.md).
may
list of stringWhat this request may do: `read`, `events`, `manage`, `visitors`, `own`. A page hides what would be refused.
name
stringWhat they are called. Empty until they say.
operator
booleanWhoever runs this tidekeeper: the operator's console is theirs.
role
stringneeded
second_step_missing
booleanThe account's owner asked that every member has a second step at sign-in, and this member has not set one up.
some_sites
booleanGiven some of the account's sites, not all.
user_id
stringneeded

Asking

With your token from Settings
curl -X POST https://tidekeeper.eu/api/v1/auth/login \
    -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"email": "…", "password": "…"}'
With your token from Settings
const answer = await fetch("https://tidekeeper.eu/api/v1/auth/login", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"email": "…", "password": "…"}),
}).then((r) => r.json());