Skip to main content
POST
/
api
/
v1
/
auth
/
login
Login With Password
curl --request POST \
  --url https://api.example.com/api/v1/auth/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>"
}
'
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({email: '<string>', password: '<string>'})
};

fetch('https://api.example.com/api/v1/auth/login', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.example.com/api/v1/auth/login"

payload = {
    "email": "<string>",
    "password": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "access_token": "<string>",
  "refresh_token": "<string>",
  "token_type": "Bearer",
  "expires_in": 900,
  "twofa_required": false,
  "challenge_token": "<string>"
}

Body

application/json
email
string
required
password
string
required
remember_me
boolean
default:true

Response

200 - application/json

OK

access_token
string | null
refresh_token
string | null
token_type
string
default:Bearer
expires_in
integer
default:900
twofa_required
boolean
default:false
challenge_token
string | null