修改账密
修改已购买静态 IP 的账号或密码,支持批量(单次最多 10 个)。
接口信息
POST /client/ip/pool/item/changeCredential
请求头
| 参数名 | 类型 | 描述 |
|---|---|---|
| x-merchant-token | String | 商户令牌 |
| x-merchant-code | String | 商户代码 |
请求参数
| 参数名 | 必选 | 类型 | 描述 |
|---|---|---|---|
| ipList | 是 | Array[String] | IP 列表 |
| account | 否 | String | 新账号,不修改可不传 |
| password | 否 | String | 新密码,不修改可不传 |
账号、密码至少填写一项。
填写时须满足:首位为字母(不能为数字),长度 8-12 位,且同时包含大写字母、小写字母与数字。
请求示例
const response = await fetch('/client/ip/pool/item/changeCredential', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-merchant-token': 'your-token-here',
'x-merchant-code': 'your-merchant-code'
},
body: JSON.stringify({
ipList: ['156.252.8.76', '156.252.8.77'],
account: 'newuser',
password: 'newpass123'
})
});
const result = await response.json();
响应示例
{
"msg": "操作成功",
"code": 200
}
说明
- 仅支持状态为「已生效」的 IP
- 单次最多 10 个 IP
- 部分 IP 可能不支持修改账号或密码,以接口返回为准