Fumadocs

Get a token

Yeah, this is the boring security stuff. Just get your super secret token and move on.

POST
/auth/token

Credentials to authenticate a user

emailstring
Formatemail
passwordstring

Response Body

curl -X POST "https://galaxy.scalar.com/auth/token" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "marc@scalar.com",
    "password": "i-love-scalar"
  }'
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
{
  "type": "https://example.com/errors/bad-request",
  "title": "Bad Request",
  "status": 400,
  "detail": "The request was invalid."
}
{
  "type": "https://example.com/errors/not-found",
  "title": "Unauthorized",
  "status": 401,
  "detail": "You are not authorized to access this resource."
}
{
  "type": "https://example.com/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "You are not authorized to access this resource."
}

How is this guide?