账号密码登录
curl --request POST \
--url https://bptest.mapleai.cc/api/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"account": "<string>",
"password": "<string>"
}
'import requests
url = "https://bptest.mapleai.cc/api/auth/login"
payload = {
"account": "<string>",
"password": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({account: '<string>', password: '<string>'})
};
fetch('https://bptest.mapleai.cc/api/auth/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 0,
"message": "操作成功",
"data": {
"access_token": "<string>",
"refresh_token": "<string>",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"email": "<string>",
"role": "<string>",
"is_active": true,
"created_at": "<string>",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_name": "<string>",
"phone": "<string>",
"full_name": "<string>",
"last_login_at": "<string>"
},
"token_type": "bearer"
},
"timestamp": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}认证授权 / Authentication
账号密码登录
用户登录接口(带速率限制)。
POST
/
api
/
auth
/
login
账号密码登录
curl --request POST \
--url https://bptest.mapleai.cc/api/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"account": "<string>",
"password": "<string>"
}
'import requests
url = "https://bptest.mapleai.cc/api/auth/login"
payload = {
"account": "<string>",
"password": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({account: '<string>', password: '<string>'})
};
fetch('https://bptest.mapleai.cc/api/auth/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 0,
"message": "操作成功",
"data": {
"access_token": "<string>",
"refresh_token": "<string>",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"email": "<string>",
"role": "<string>",
"is_active": true,
"created_at": "<string>",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_name": "<string>",
"phone": "<string>",
"full_name": "<string>",
"last_login_at": "<string>"
},
"token_type": "bearer"
},
"timestamp": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}