Skip to content

Sign in

POST
/auth/login
curl --request POST \
--url https://acme.mykreezalid.com/front_api/v1/auth/login \
--header 'Content-Type: application/json' \
--data '{ "email": "jane@example.com", "password": "correct horse battery staple" }'

Checks a member’s email address and password and returns an access token. Send it as Authorization: Bearer <token> on the following requests. The token is valid for one year and cannot be refreshed: sign in again to get a new one. Only active, non-blocked accounts can sign in; any other account is answered like an unknown email address. This endpoint only works for a visitor who is not signed in: a request that already carries a valid token or session is refused with 403.

Media typeapplication/json
object
email
required
string format: email

Example

jane@example.com
password
required
string format: password

Example

correct horse battery staple

Signed in.

Media typeapplication/json
object
status
string
data
object
token

Access token, valid for one year.

string

Example

{
"status": "success",
"data": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
}

The request already identifies a signed-in member.

Wrong credentials: Invalid Email Address when no active account uses this email address, Invalid Password when the password does not match.

Media typeapplication/json

Error body returned by the Front API when it refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message

Human-readable reason.

string

Example

{
"code": 403,
"status": "error",
"message": "Token not found in request"
}