cURL
curl --request POST \
--url "https://omnimux.ai/api/social/v1/connect" \
--header 'Authorization: Bearer <user-access-token>' \
--header 'New-Api-User: <user-id>' \
--header 'Content-Type: application/json' \
--data '{"provider":"zernio","platform":"tiktok"}'import requests
url = "https://omnimux.ai/api/social/v1/connect"
payload = {
"provider": "zernio",
"platform": "tiktok"
}
headers = {
"Authorization": "Bearer <token>",
"New-Api-User": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'New-Api-User': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({provider: 'zernio', platform: 'tiktok'})
};
fetch('https://omnimux.ai/api/social/v1/connect', 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://omnimux.ai/api/social/v1/connect"
payload := strings.NewReader("{\n \"provider\": \"zernio\",\n \"platform\": \"tiktok\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("New-Api-User", "<api-key>")
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))
}{
"success": true,
"data": {
"auth_url": "<string>",
"platform": "<string>",
"provider": "zernio"
}
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}连接账户
发起连接
发起连接 — 显式账号来源
POST
/
api
/
social
/
v1
/
connect
cURL
curl --request POST \
--url "https://omnimux.ai/api/social/v1/connect" \
--header 'Authorization: Bearer <user-access-token>' \
--header 'New-Api-User: <user-id>' \
--header 'Content-Type: application/json' \
--data '{"provider":"zernio","platform":"tiktok"}'import requests
url = "https://omnimux.ai/api/social/v1/connect"
payload = {
"provider": "zernio",
"platform": "tiktok"
}
headers = {
"Authorization": "Bearer <token>",
"New-Api-User": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'New-Api-User': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({provider: 'zernio', platform: 'tiktok'})
};
fetch('https://omnimux.ai/api/social/v1/connect', 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://omnimux.ai/api/social/v1/connect"
payload := strings.NewReader("{\n \"provider\": \"zernio\",\n \"platform\": \"tiktok\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("New-Api-User", "<api-key>")
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))
}{
"success": true,
"data": {
"auth_url": "<string>",
"platform": "<string>",
"provider": "zernio"
}
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}明确选择来源。tiktok_direct 仅授权 TikTok,官方配置不可用时失败,不回退;zernio 不受官方开关改变。调用此接口会启动授权流程。
provider 必填,仅允许 tiktok_direct 或 zernio,表示操作范围,不能改写已存来源。缺失或未知值返回 400 invalid-provider。
使用 OmniMux 用户 access token 和 New-Api-User,不是 sk- 密钥。同时检查 HTTP 状态和 success;部分上游错误仍返回 HTTP 200、success:false。授权
OmniMux user access token, not an sk- API key.
Current authenticated user ID.
请求体
application/json
Required expected source; never changes the stored account or post provider.
可用选项:
tiktok_direct, zernio tiktok_direct only accepts TikTok. zernio follows the configured platform allowlist.
Allowed return URL; validated against gateway configuration.