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":"tiktok_direct","platform":"tiktok"}'import requests
url = "https://omnimux.ai/api/social/v1/connect"
payload = {
"provider": "tiktok_direct",
"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: 'tiktok_direct', 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\": \"tiktok_direct\",\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": "tiktok_direct"
}
}{
"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>"
}{
"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":"tiktok_direct","platform":"tiktok"}'import requests
url = "https://omnimux.ai/api/social/v1/connect"
payload = {
"provider": "tiktok_direct",
"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: 'tiktok_direct', 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\": \"tiktok_direct\",\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": "tiktok_direct"
}
}{
"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>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}启动平台官方授权流程。目前仅提供 TikTok 官方直连(Login Kit + Content Posting API);其他平台尚不可用,传入未开放平台返回 400
对于
SOCIAL_PLATFORM_DENIED。
TikTok 官方直连已上线(2026-11-12 审核通过)。当前授权范围包含
user.info.basic 与 video.upload:可连接账号并上传视频或图文轮播草稿;公开直发需平台另行批准 video.publish。tiktok_direct,返回的 auth_url 是短效、一次性的同源启动中转入口(/api/social/v1/oauth/tiktok/start?ticket=...,有效期 3 分钟)。在用户系统浏览器中打开该地址后,网关会原子消费该票据、在当前浏览器上下文签发防 CSRF Cookie,再返回 302 Found 跳转至 TikTok 官方授权页,确保桌面端、CLI 与 Web 场景的跨浏览器回调均能正常完成。
provider 必填,当前唯一取值 tiktok_direct。已退役的来源标识返回 410 provider-retired,缺失或未知值返回 400 invalid-provider。
CLI 使用 omnimux social connect --provider tiktok_direct --platform tiktok。若向 CLI 传入已退役的 --provider 取值,CLI 会在发起网络请求前直接在本地报错并给出迁移指引。
使用 OmniMux 用户 access token 和 New-Api-User,不是 sk- 密钥。同时检查 HTTP 状态和 success;部分上游错误仍返回 HTTP 200、success:false。授权
请求体
application/json