跳至內容
Fumadocs

Get a token

POST
/auth/token

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

請求主體

Body for credentials to authenticate a user

  1. body

Credentials to authenticate a user

email*string
格式email
password*string

回應主體

Token Created

  1. response

A token to authenticate a user

token?string
範例請求
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"
}