刷新 JWT
curl --request POST \
--url https://bptest.mapleai.cc/api/auth/refresh \
--header 'Content-Type: application/json' \
--data '
{
"refresh_token": "<string>"
}
'import requests
url = "https://bptest.mapleai.cc/api/auth/refresh"
payload = { "refresh_token": "<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({refresh_token: '<string>'})
};
fetch('https://bptest.mapleai.cc/api/auth/refresh', 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>",
"token_type": "bearer"
},
"timestamp": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}认证授权 / Authentication
刷新 JWT
刷新访问令牌
POST
/
api
/
auth
/
refresh
刷新 JWT
curl --request POST \
--url https://bptest.mapleai.cc/api/auth/refresh \
--header 'Content-Type: application/json' \
--data '
{
"refresh_token": "<string>"
}
'import requests
url = "https://bptest.mapleai.cc/api/auth/refresh"
payload = { "refresh_token": "<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({refresh_token: '<string>'})
};
fetch('https://bptest.mapleai.cc/api/auth/refresh', 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>",
"token_type": "bearer"
},
"timestamp": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}