Create a local password session.
POST
/v1/auth/login
const url = 'https://api.dev.iot-sens.schlossers.at/v1/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"identifier":"example","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.dev.iot-sens.schlossers.at/v1/auth/login \ --header 'Content-Type: application/json' \ --data '{ "identifier": "example", "password": "example" }'Accepts a normalized username or email address and an unmodified password. On success, returns a short-lived access token and sets the rotating refresh token in a host-only HttpOnly cookie. Authentication responses are never cacheable.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
identifier
required
string
password
required
string
Examplegenerated
{ "identifier": "example", "password": "example"}Responses
Section titled “Responses”A short-lived access token and rotated refresh cookie.
Media typeapplication/json
object
accessToken
required
string
tokenType
required
string
expiresInSeconds
required
integer
refreshIdleExpiresAt
required
string format: date-time
passwordChangeRequired
required
boolean
Example
{ "tokenType": "Bearer", "expiresInSeconds": 1800}Headers
Section titled “Headers”Cache-Control
string
Set-Cookie
string
Host-only HttpOnly refresh cookie; never contains an access token.
A safe platform error response.
Media typeapplication/json
object
error
required
object
Example
{ "error": { "code": "VALIDATION_FAILED", "category": "validation" }}Headers
Section titled “Headers”Cache-Control
string
A safe platform error response.
Media typeapplication/json
object
error
required
object
Example
{ "error": { "code": "VALIDATION_FAILED", "category": "validation" }}Headers
Section titled “Headers”Cache-Control
string
Login or password-check capacity is temporarily limited.
Media typeapplication/json
object
error
required
object
Example
{ "error": { "code": "VALIDATION_FAILED", "category": "validation" }}Headers
Section titled “Headers”Cache-Control
string
Retry-After
integer
A safe platform error response.
Media typeapplication/json
object
error
required
object
Example
{ "error": { "code": "VALIDATION_FAILED", "category": "validation" }}Headers
Section titled “Headers”Cache-Control
string
A safe platform error response.
Media typeapplication/json
object
error
required
object
Example
{ "error": { "code": "VALIDATION_FAILED", "category": "validation" }}Headers
Section titled “Headers”Cache-Control
string