生成OAuth State
curl --request POST \
--url https://api.lmm.best/api/oauth/state \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>"
}
'import requests
url = "https://api.lmm.best/api/oauth/state"
payload = { "provider": "<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({provider: '<string>'})
};
fetch('https://api.lmm.best/api/oauth/state', 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/oauth/state"
payload := strings.NewReader("{\n \"provider\": \"<string>\"\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))
}OAuth
生成OAuth State
创建一次性 OAuth AuthFlow。login 无需鉴权;bind 需要面板 Access Token 并绑定当前登录会话
POST
/
api
/
oauth
/
state
生成OAuth State
curl --request POST \
--url https://api.lmm.best/api/oauth/state \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>"
}
'import requests
url = "https://api.lmm.best/api/oauth/state"
payload = { "provider": "<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({provider: '<string>'})
};
fetch('https://api.lmm.best/api/oauth/state', 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/oauth/state"
payload := strings.NewReader("{\n \"provider\": \"<string>\"\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