Skip to content

Sign in and receive a session cookie

POST
/api/auth/login
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.

Media typeapplication/json
object
username
required
string
password
required
string format: password
Examplegenerated
{
"username": "example",
"password": "example"
}

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"
}