Uygulamayı aç
Moonborn — API · auth

Authenticate with email + password (+ optional TOTP)

POST/v1/auth/loginscope · Public (no auth)
Request body
FieldTypeDescription
emailreqstring
passwordreqstring
totpCodestring
captchaTokenstring

Responses

200OK
Body
FieldTypeDescription
sessionIdreqstring
userIdreqstring
expiresAtreqstring
mfaRequiredreqboolean
401Invalid credentials
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
423Account locked (rate limit)
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
428MFA required
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring

Examples

cURL
curl -X POST https://api.moonborn.co/v1/auth/login \
  -H "Authorization: Bearer $MOONBORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "email": "<string>",
      "password": "<string>"
    }'
TypeScript
import Moonborn from '@moonborn/sdk';

const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });

const result = await client.auth.loginUser({
  email: "<string>",
  password: "<string>",
});
Python
import os
from moonborn import Moonborn

client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])

result = client.auth.login_user(
    email="<string>",
    password="<string>",
)