Sign in and receive a session cookie
POST
/api/auth/login
const url = 'https://app.dycrypt.com/o/acme/api/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"username":"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://app.dycrypt.com/o/acme/api/auth/login \ --header 'Content-Type: application/json' \ --data '{ "username": "example", "password": "example" }'For the console. Automation should use a token instead.
“No such user”, “wrong password” and “disabled” are never distinguished.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
username
required
string
password
required
string format: password
Examplegenerated
{ "username": "example", "password": "example"}Responses
Section titled “Responses”Who you now are.
Media typeapplication/json
Who a credential is. Open to tokens — it reveals nothing the caller did not already hold.
object
username
A token appears as token/<name>.
string
displayName
string
role
string
platform
True for a control-plane account
boolean
platformRole
Present only for a control-plane account. Advisory — every refusal is the server’s.
string
version
string
organization
object
slug
string
name
string
tenant
The organisation this request resolved to.
string | null
Examplegenerated
{ "username": "example", "displayName": "example", "role": "example", "platform": true, "platformRole": "example", "version": "example", "organization": { "slug": "example", "name": "example" }, "tenant": "example"}The request is wrong — a bad date, a missing field, a value the product does not declare.
Media typeapplication/json
Every failure in this API has this shape and no other.
object
error
required
string
Example
{ "error": "this token does not have licenses:write"}Wrong username or password.
Media typeapplication/json
Every failure in this API has this shape and no other.
object
error
required
string
Example
{ "error": "this token does not have licenses:write"}