OpenapiAuth
Authenticate user with email/username and password
Supports both email and username login. Returns a session token or requires TOTP verification if two-factor authentication is enabled for the user.
Supports both email and username login. Returns a session token or requires TOTP verification if two-factor authentication is enabled for the user.
Path Parameters
realmId*string
Realm ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
agreements?array<>|null
clientId*string
email?string|null
oauthClientId?string|null
password*string
redirectUri?string|null
state?string|null
turnstileToken?string|null
username?string|null
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/auth/string/login" \ -H "Content-Type: application/json" \ -d '{ "clientId": "string", "password": "string" }'{ "agreements": [ { "agreement_type": "string", "effective_at": "2019-08-24T14:15:22Z", "external_url": "string", "mode": "full_text", "summary": "string", "title": "string", "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c", "version_no": 0 } ], "consentRequired": true, "expiresInSeconds": 0, "message": "string", "realmId": "string", "redirectTo": "string", "requiresTotp": true, "secondFactors": [ "string" ], "tempToken": "string", "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b"}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}