Sign in
const url = 'https://acme.mykreezalid.com/front_api/v1/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"jane@example.com","password":"correct horse battery staple"}'};
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://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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
jane@example.comExample
correct horse battery stapleResponses
Section titled “Responses”Signed in.
object
object
Access token, valid for one year.
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.
Error body returned by the Front API when it refuses a request.
object
HTTP status code, repeated in the body.
Human-readable reason.
Example
{ "code": 403, "status": "error", "message": "Token not found in request"}