LoguDocs
Open Logu

Sign-in · signInWithPassword

Sign in with a password

POST /api/auth/sign-in/email

Better Auth's sign-in. Errors are Better Auth's { code, message } (401 INVALID_EMAIL_OR_PASSWORD). Rate limited per IP. Needs the Turnstile-Token header when the server uses Cloudflare Turnstile (403 forbidden otherwise); never subject to the global daily caps.

Who may call it
Anyone (no credentials)
Server
https://api.logu.dev

Request body#

Content type application/json (required).

FieldTypeRequiredNotes
emailstringrequiredemail
passwordstringrequired
{
  "email": "ana@example.com",
  "password": "correct horse battery"
}

Example#

curl -s -X POST "https://api.logu.dev/api/auth/sign-in/email" \
  -H "Content-Type: application/json" \
  -d '{"email":"ana@example.com","password":"correct horse battery"}'

Responses#

200

Signed in.

{
  "token": "Ln3Vq7",
  "user": {
    "id": "Xq3bY7tLmN2pR8sV",
    "email": "ana@example.com",
    "name": "Ana"
  }
}
Response fields
FieldTypeRequiredNotes
tokenstringrequired
userobjectrequired
user.idstringrequired
user.emailstringrequired
user.namestringrequired

Errors#

Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.

StatusCodeMeaning
400bad_requestThe request is malformed or a field is invalid (see issues).
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
429rate_limitedThis API key sent too many requests, or a human did too much too fast: sign-in attempts, workspaces created in a day, or a global daily cap on new accounts was reached.
500internal_errorSomething went wrong on Logu's side.