创建令牌
curl --request POST \
--url https://api.lmm.best/api/token/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"user_id": 123,
"name": "<string>",
"key": "<string>",
"status": 123,
"expired_time": 123,
"remain_quota": 123,
"unlimited_quota": true
}
'import requests
url = "https://api.lmm.best/api/token/"
payload = {
"id": 123,
"user_id": 123,
"name": "<string>",
"key": "<string>",
"status": 123,
"expired_time": 123,
"remain_quota": 123,
"unlimited_quota": True
}
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({
id: 123,
user_id: 123,
name: '<string>',
key: '<string>',
status: 123,
expired_time: 123,
remain_quota: 123,
unlimited_quota: true
})
};
fetch('https://api.lmm.best/api/token/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lmm.best/api/token/"
payload := strings.NewReader("{\n \"id\": 123,\n \"user_id\": 123,\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"status\": 123,\n \"expired_time\": 123,\n \"remain_quota\": 123,\n \"unlimited_quota\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}令牌管理
创建令牌
🔐 需要登录(User权限)
POST
/
api
/
token
/
创建令牌
curl --request POST \
--url https://api.lmm.best/api/token/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"user_id": 123,
"name": "<string>",
"key": "<string>",
"status": 123,
"expired_time": 123,
"remain_quota": 123,
"unlimited_quota": true
}
'import requests
url = "https://api.lmm.best/api/token/"
payload = {
"id": 123,
"user_id": 123,
"name": "<string>",
"key": "<string>",
"status": 123,
"expired_time": 123,
"remain_quota": 123,
"unlimited_quota": True
}
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({
id: 123,
user_id: 123,
name: '<string>',
key: '<string>',
status: 123,
expired_time: 123,
remain_quota: 123,
unlimited_quota: true
})
};
fetch('https://api.lmm.best/api/token/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lmm.best/api/token/"
payload := strings.NewReader("{\n \"id\": 123,\n \"user_id\": 123,\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"status\": 123,\n \"expired_time\": 123,\n \"remain_quota\": 123,\n \"unlimited_quota\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}最后修改于 2026年9月23日
⌘I