# Authentication

# Login

You can use this API to login the application with your account. The jwt token must be used in later requests, sent using the X-access-token header.

# Endpoint

POST /user/login

# Parameters

Name Type Description Required
email string email ✔️
password string password ✔️

# Response

Status: 200

{
  "success": true,
  "jwtToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsImlhdCI6MTYxMTE3NDcyOCwiZXhwIjoxNjExNzc5NTI4fQ.IUDW9DeKsPTmJ8EupsprFV8UArqJcsNAbF_-IrxBG1Q"
}
curl -X POST https://www.juungle.net/api/v1/user/login \
  --data '{
    "username": "my-username",
    "password": "my-password"
  }'

# Register

You can use this API to signup the application with your account.

# Endpoint

POST /user/register

# Parameters

Name Type Description Required
email string email ✔️
password string password ✔️

# Response

Status: 200

{
  "success": true
}
curl -X POST https://www.juungle.net/api/v1/api/user/register \
  --data '{
    "email": "email@example.com",
    "password": "my-password"
  }'