接口列表
小于 1 分钟
/pool/update
1. - 接口描述: 注册或更新
Pool Token
- HTTP方法:
POST
- 请求类型:
application/x-www-form-urlencoded
- 请求字段:
share_tokens
:Share Token
列表,每行1
个,最多100
个pool_token
:Pool Token
,可留空,留空时生成新Pool Token
不为空则更新Pool Token
- 返回字段: 返回
Pool Token
等信息 - 频率控制: 无
- 特别说明:
share_tokens
为空,且pool_token
不为空时,会吊销指定的Pool Token
Curl
curl --location 'https://ai.fakeopen.com/pool/update' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'share_tokens=<Share Token>' \
--data-urlencode 'pool_token=<Pool Token>'
javascript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("share_tokens", "<Share Token>");
urlencoded.append("pool_token", "<Pool Token>");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://ai.fakeopen.com/pool/update", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
nodejs
const axios = require('axios');
const qs = require('qs');
let data = qs.stringify({
'share_tokens': '<Share Token>',
'pool_token': '<Pool Token>'
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://ai.fakeopen.com/pool/update',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Python
import requests
url = "https://ai.fakeopen.com/pool/update"
payload = 'share_tokens=<Share Token>&pool_token=<Pool Token>'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)