渠道管理/内容发布
重试发布任务
接口说明:重试当前用户失败的发布任务
POST
/
api
/
v2
/
channels
/
publish
/
tasks
/
{taskId}
/
retry
重试发布任务
curl --request POST \
--url https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/retry \
--header 'X-Api-Key: <api-key>'import requests
url = "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/retry"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"taskId": "string"
}
}授权
需要从 AiToEarn 获取 API Key。点击前往「API Key 获取教程」。
路径参数
任务 ID
⌘I
重试发布任务
curl --request POST \
--url https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/retry \
--header 'X-Api-Key: <api-key>'import requests
url = "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/retry"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"taskId": "string"
}
}
