Akter

Sign in

Sign up and sign in with a one-time code emailed to you, typed into the terminal. No web page.

Send code⁠

POSThttps://api.akter.dev/v1/sign-in/codes
signIn.sendCodeNo token

Email a six-digit sign-in code, or a recovery code with purpose recovery. It works once for 10 minutes, and a newer code replaces it.

Request bodySendCode

  • emailstringrequired

    An email address, such as ada@example.com.

  • purpose"signIn" | "recovery"

    signIn emails a code that signs in, creating the account the first time; recovery emails the same kind of code worded for someone who lost their session.

Response 202CodeSent

  • emailstringrequired

    An email address, such as ada@example.com.

  • expiresAtstringrequired

Errors

  • 429RateLimitedError

Verify code⁠

POSThttps://api.akter.dev/v1/sign-in/sessions
signIn.verifyCodeNo token

Turn an emailed code into a session, creating the account on its first sign-in. Creating one needs acceptedTerms, the current version of the terms of service and privacy notice; without it the answer is TermsNotAcceptedError with that version, and the code still works. The session's secret is shown once; endOtherSessions signs every other session out.

Request bodyVerifyCode

  • acceptedTermsstring

    The version of the terms of service and privacy notice the person accepted, as the version: line of akter docs legal/terms. Required when the code creates an account.

  • codestringrequired

    The 6-digit code from the email.

  • emailstringrequired

    An email address, such as ada@example.com.

  • endOtherSessionsboolean

    Also revoke every other session of the account, as a recovery does after a lost machine.

Response 201SignedIn

  • accountAccountrequired
  • account.acceptedTermsAcceptedTerms

    The terms of service and privacy notice the account accepted at sign-up, and when. Accounts made before sign-up asked have none.

  • account.acceptedTerms.acceptedAtstringrequired
  • account.acceptedTerms.versionstringrequired

    The version of the terms of service and privacy notice, as their version: line.

  • account.createdAtstringrequired
  • account.emailstringrequired

    An email address, such as ada@example.com.

  • account.idstringrequired

    An opaque id that starts with usr_.

  • createdbooleanrequired

    true when this code created the account.

  • secretstringrequired

    The session's bearer secret, as_ and 32 characters. Exchange it at POST /v1/tokens. It is returned once and never again.

  • sessionSessionrequired
  • session.createdAtstringrequired
  • session.expiresAtstringrequired
  • session.idstringrequired

    An opaque id that starts with ses_.

Errors

  • 401CodeRejectedError
  • 422TermsNotAcceptedError
  • 429RateLimitedError