Skip to main content
POST
/
login
cURL
curl --request POST \
  --url http://localhost:3333/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "username": "<string>",
  "email": "<string>",
  "password": "<string>"
}
'
{
  "id": "<string>",
  "username": "<string>",
  "email": "<string>",
  "rememberMeToken": true,
  "roles": {
    "id": 123,
    "name": "<string>"
  },
  "created_at": "<string>",
  "updated_at": "<string>"
}

Body

application/json
password
string
required
username
string
email
string

Response

User logged in

id
string

The id of the user.

username
string

The username of the user.

email
string

The email of the user.

rememberMeToken
boolean

If the user want to stay logged.

roles
object

The roles of the user, by default the user has the role of 'user'.

created_at
string

The date when the user was created.

updated_at
string

The date when the user was updated.