身份验证
合作伙伴账户激活后即可使用 API。令牌只能在 GIGABIT 控制面板中创建和撤销。新令牌会替换旧令牌,且仅显示一次。
令牌须通过 HTTP 请求头 Authorization 发送,使用 Bearer 认证方式。
Authorization: Bearer gbp_PARTNER_TOKEN请求与响应格式
请求体采用 JSON 格式。每个接口均提供请求和响应示例。
| 项目 | 格式与含义 |
|---|---|
| 请求体 | JSON 对象,Content-Type 为 application/json。无参数时可省略请求体。 |
| HTTP 202 | 操作已受理。服务器返回 id 和 status_url,用于查询进度。 |
| GET /operations/{id} | queued:等待中;processing:处理中;ready:已完成;failed:失败。result 包含结果,error 包含错误代码。 |
| 日期 | 带时区的 ISO 8601 格式,例如 2026-12-09T22:59:59+00:00。 |
| 金额 | _cents 字段以欧分整数表示。4500 = 45.00 欧元。 |
| 限制 | 请求体最大 16 KiB;每个账户每小时最多 600 次请求。HTTP 429 响应中的 Retry-After 指定等待时长。 |
成功响应
{
"success": true,
"data": {
"currency": "EUR",
"balance_cents": 10000
}
}错误响应
{
"success": false,
"error": "unauthenticated"
}余额与支付
通过 API 订购和续租的周期均为单个端口 30 天。应用专属折扣后的价格从未税余额中扣除。available_cents 已计入信用额度和预留资金。
增值税根据账单资料确定,并在 Stripe 充值时收取。购买端口时不会重复收税。
错误
| HTTP | error | 说明 |
|---|---|---|
| 400 | invalid_rotation_token_request | 重置令牌不接受额外参数。 |
| 400 | invalid_json | 请求体中的 JSON 无效。 |
| 400 | invalid_payment_request | 请求参数不受支持或无效。 |
| 400 | invalid_payment_orders | 端口编号或 ID 无效。 |
| 400 | invalid_partner_amount | 金额不在允许范围内。 |
| 400 | invalid_pagination | 分页参数无效。 |
| 400 | invalid_partner_prefix | 登录名前缀不符合要求。 |
| 400 | invalid_rotation_interval | rotation 或 rotation_seconds 字段无效。 |
| 401 | unauthenticated | 令牌缺失、无效或已撤销。 |
| 403 | partner_required | 需要已激活的合作伙伴账户。 |
| 403 | payment_method_unavailable | 此账户无法使用该付款方式。 |
| 403 | origin_not_allowed | 请求来源不被允许。 |
| 404 | not_found | 对象不存在或此账户无权访问。 |
| 409 | insufficient_partner_balance | 计入信用额度和预留资金后,可用资金不足。 |
| 409 | insufficient_withdrawable_balance | 可退款金额不足。 |
| 409 | inventory_changed | 读取目录后,端口可用情况已发生变化。 |
| 409 | partner_prefix_taken | 该前缀已被使用。 |
| 409 | record_changed_or_in_use | 记录已更改或正被其他操作使用。 |
| 409 | payment_busy | 相关操作仍在处理中。 |
| 409 | rotation_busy | IP 轮换仍在进行中。 |
| 409 | billing_required | 账户资料缺少必要的账单信息。 |
| 409 | rotation_interval_too_short | 间隔小于 20 秒或低于端口服务器允许的下限。 |
| 403 / 409 | order_expired | 租用已失效。续租后可修改连接凭据并轮换 IP。 |
| 429 | too_many_requests | 超出请求频率限制。Retry-After 指定等待时长。 |
| 502 | proxy_server_unavailable | 代理服务器暂时不可用。 |
| 502 | rotation_sync_pending | IP 轮换设置尚未确认生效。 |
| 503 | database_unavailable | 数据库暂时不可用。 |
| 503 | stripe_unavailable | 支付服务暂时不可用。 |
| 400 | invalid_wireguard_request | WireGuard 请求体无效。 |
| 404 | wireguard_not_created | 配置不存在或已删除。请对有效租用发送 POST 请求创建配置。 |
| 409 | wireguard_unsupported | 该端口不支持 WireGuard。 |
| 409 | wireguard_profile_conflict | 无法唯一确定租用配置。请联系支持团队。 |
| 502 | wireguard_sync_pending | 服务器尚未确认设置生效。操作会自动重试,请稍后重试 GET 请求。 |
操作状态
返回账户内操作的状态与结果。可快速查询,无需重复执行操作。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | HTTP 202 响应中返回的操作 ID。 |
请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"id": "partner_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"order_ids": [
"a1b2c3d4e5f60123456789abcdef0123"
],
"amount_cents": 4050,
"currency": "EUR",
"price": {
"currency": "EUR",
"base_net_cents": 4500,
"net_cents": 4050,
"vat_cents": 0,
"total_cents": 4050,
"tax_at_topup": true,
"discount_percent": 10,
"months": 1,
"days": 30,
"pricing_version": 1,
"tax": {
"mode": "vat",
"rate_percent": 23,
"vat_code": "23",
"reverse_charge": false
}
}
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "failed",
"error": "insufficient_partner_balance",
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}余额
当前余额、信用额度、可用资金、折扣和合作伙伴价格。
无需请求体。
请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/balance' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/balance",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/balance",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"currency": "EUR",
"balance_cents": 10000,
"reserved_cents": 0,
"credit_limit_cents": 10000,
"debt_cents": 0,
"available_cents": 20000,
"withdrawable_cents": 10000,
"discount_percent": 10,
"prefix": "astra",
"api_token_hint": "demo12",
"monthly_net_cents": 4500,
"payment_method": "card",
"connection_domains": {
"host": "",
"api": ""
},
"paid_in_cents": 10000,
"prices": [
{
"currency": "EUR",
"base_net_cents": 4500,
"net_cents": 4050,
"vat_cents": 0,
"total_cents": 4050,
"tax_at_topup": true,
"discount_percent": 10,
"months": 1,
"days": 30,
"pricing_version": 1,
"tax": {
"mode": "vat",
"rate_percent": 23,
"vat_code": "23",
"reverse_charge": false
}
}
],
"topup_tax": {
"mode": "vat",
"rate_percent": 23,
"vat_code": "23",
"reverse_charge": false
},
"can_order_new_ports": true
}
}账户充值
创建 Stripe 支付链接。amount_cents 为以欧分表示的余额入账金额;total_cents 为包含适用增值税的应付总额。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
amount_centsJSON 请求体 · 必填 | integer100-10000000 | 1–100,000 欧元,以欧分整数表示。 |
请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/topups' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"amount_cents": 10000
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/topups",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount_cents": 10000
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/topups",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'amount_cents': 10000},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"id": "ptop_0123456789abcdef0123456789abcdef",
"state": "pending",
"url": "https://checkout.stripe.com/c/pay/EXAMPLE_SESSION",
"amount_cents": 10000,
"vat_cents": 2300,
"total_cents": 12300,
"currency": "EUR"
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}充值状态
返回账户充值状态。paid 表示金额已计入余额。仅从 Stripe 返回不代表付款成功。
状态:creating、pending、paid、expired、failed。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | POST /topups 返回的充值 ID。 |
请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/topups/ptop_0123456789abcdef0123456789abcdef' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/topups/ptop_0123456789abcdef0123456789abcdef",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/topups/ptop_0123456789abcdef0123456789abcdef",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "ptop_0123456789abcdef0123456789abcdef",
"state": "pending",
"url": "https://checkout.stripe.com/c/pay/EXAMPLE_SESSION",
"amount_cents": 10000,
"vat_cents": 2300,
"total_cents": 12300,
"currency": "EUR"
}
}交易历史
按从新到旧的顺序列出交易,包括来源、备注、金额及每笔交易后的余额。购买时的技术性资金预留默认隐藏。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
offset查询 · 可选 | integer0-∞ | 跳过的记录数。 |
limit查询 · 可选 | integer1-100 | 每页记录数:1–100。 |
include_reservations查询 · 可选 | string1 | 设为 1 时包含 purchase_reserve 和 purchase_release。 |
请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/transactions?offset=0&limit=30' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/transactions?offset=0&limit=30",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/transactions?offset=0&limit=30",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"items": [
{
"id": "ptop_0123456789abcdef0123456789abcdef:credit",
"created_at": "2026-11-09T12:05:00+00:00",
"currency": "EUR",
"operation": "topup",
"amount_cents": 10000,
"reserved_delta_cents": 0,
"source": "stripe",
"comment": "",
"reference": "ptop_0123456789abcdef0123456789abcdef",
"balance_after_cents": 10000,
"reserved_after_cents": 0,
"sequence": 1
}
],
"total": 1,
"offset": 0,
"limit": 30
}
}提款申请
创建申请并预留金额,等待审核。withdrawable_cents 表示可退款金额,不包含信用额度和不可退的补偿金额。
申请处理后,result.state=requested 表示等待审核决定。在付款确认或申请被拒绝前,操作状态保持 processing。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
amount_centsJSON 请求体 · 必填 | integer100-100000000 | 以欧分表示的金额,不得超过可提款金额。 |
commentJSON 请求体 · 必填 | string1-2000 | 收款信息或说明。去除首尾空白后不能为空。 |
请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/withdrawals' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"amount_cents": 5000,
"comment": "Please contact me to confirm payment details."
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/withdrawals",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount_cents": 5000,
"comment": "Please contact me to confirm payment details."
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/withdrawals",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'amount_cents': 5000,
'comment': 'Please contact me to confirm payment details.'},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"id": "pout_0123456789abcdef0123456789abcdef",
"state": "paid"
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}可用端口
按运营商和地点分组的可用端口编号。
每个端口均提供 supports_wireguard 字段,便于您在购买前选择支持 WireGuard 的调制解调器。
无需请求体。
请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/catalog' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/catalog",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/catalog",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"items": [
{
"operator": {
"id": "operator-orange",
"name": "Orange"
},
"location": {
"id": "location-warsaw",
"name": "Warsaw"
},
"ports": [
{
"id": "b1c2d3e4f5a60123456789abcdef0123",
"number": 10001,
"supports_wireguard": true
},
{
"id": "b2c3d4e5f6a70123456789abcdef0123",
"number": 10002,
"supports_wireguard": true
}
],
"available": 2
}
],
"prices": [
{
"currency": "EUR",
"base_net_cents": 4500,
"net_cents": 4050,
"vat_cents": 0,
"total_cents": 4050,
"tax_at_topup": true,
"discount_percent": 10,
"months": 1,
"days": 30,
"pricing_version": 1,
"tax": {
"mode": "vat",
"rate_percent": 23,
"vat_code": "23",
"reverse_charge": false
}
}
]
}
}订购端口
使用目录中的端口编号或 ID 订购一个可用端口,租期为 30 天。费用从余额中扣除。
耗时操作返回 HTTP 202 和服务器生成的 id。通过 GET /operations/{id} 查询状态及结果。查询状态不会创建新操作。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
port_numberJSON 请求体 · 可选 | integer1-65535 | 目录中的端口编号。port_number 与 port_id 必须且只能填写其中一个。 |
port_idJSON 请求体 · 可选 | string1-120 | 目录中的端口 ID,可替代 port_number。 |
请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/orders' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"port_number": 10001
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"port_number": 10001
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/orders",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'port_number': 10001},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"id": "partner_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"order_ids": [
"a1b2c3d4e5f60123456789abcdef0123"
],
"amount_cents": 4050,
"currency": "EUR",
"price": {
"currency": "EUR",
"base_net_cents": 4500,
"net_cents": 4050,
"vat_cents": 0,
"total_cents": 4050,
"tax_at_topup": true,
"discount_percent": 10,
"months": 1,
"days": 30,
"pricing_version": 1,
"tax": {
"mode": "vat",
"rate_percent": 23,
"vat_code": "23",
"reverse_charge": false
}
}
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/orders' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"port_id": "b1c2d3e4f5a60123456789abcdef0123"
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"port_id": "b1c2d3e4f5a60123456789abcdef0123"
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/orders",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'port_id': 'b1c2d3e4f5a60123456789abcdef0123'},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"id": "partner_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"order_ids": [
"a1b2c3d4e5f60123456789abcdef0123"
],
"amount_cents": 4050,
"currency": "EUR",
"price": {
"currency": "EUR",
"base_net_cents": 4500,
"net_cents": 4050,
"vat_cents": 0,
"total_cents": 4050,
"tax_at_topup": true,
"discount_percent": 10,
"months": 1,
"days": 30,
"pricing_version": 1,
"tax": {
"mode": "vat",
"rate_percent": 23,
"vat_code": "23",
"reverse_charge": false
}
}
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}端口列表
账户当前端口:租用到期时间、连接信息、IP 和自动 IP 轮换设置。
如需更换 IP,请向端口详情返回的完整 rotation_url 发送 GET 请求。无需 Authorization 请求头,因为 URL 已包含端口令牌。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
include查询 · 可选 | stringwireguard | 添加 include=wireguard 可获取每个受支持端口的现有配置和二维码。 |
请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/orders' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/orders",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"items": [
{
"id": "a1b2c3d4e5f60123456789abcdef0123",
"port_id": "b1c2d3e4f5a60123456789abcdef0123",
"number": 10001,
"host": "l1.gigabit.ltd",
"username": "astra_a1b2c3d4e5f",
"proxy_password": "EXAMPLE_ONLY_22_CHARS_x",
"status": "active",
"expires": "2026-12-09T22:59:59+00:00",
"operator": "Orange",
"cityName": "Warsaw",
"ip": "198.51.100.42",
"speed": {
"mbps": 28.43,
"checked_at": "2026-11-11T12:00:00+00:00"
},
"rotation_url": "https://api.gigabit.ltd/change_ip?token=EXAMPLE_ROTATION_TOKEN_REPLACE_ME",
"rotation": true,
"rotation_seconds": 120,
"connection_options": {
"udp": {
"host": "203.0.113.10"
},
"custom": {
"host": "proxy.example.com",
"rotation_url": "https://api.example.com/change_ip?token=EXAMPLE_ROTATION_TOKEN_REPLACE_ME"
}
},
"supports_wireguard": true
}
]
}
}请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/orders?include=wireguard' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders?include=wireguard",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/orders?include=wireguard",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"items": [
{
"id": "a1b2c3d4e5f60123456789abcdef0123",
"port_id": "b1c2d3e4f5a60123456789abcdef0123",
"number": 10001,
"host": "l1.gigabit.ltd",
"username": "astra_a1b2c3d4e5f",
"proxy_password": "EXAMPLE_ONLY_22_CHARS_x",
"status": "active",
"expires": "2026-12-09T22:59:59+00:00",
"operator": "Orange",
"cityName": "Warsaw",
"ip": "198.51.100.42",
"speed": {
"mbps": 28.43,
"checked_at": "2026-11-11T12:00:00+00:00"
},
"rotation_url": "https://api.gigabit.ltd/change_ip?token=EXAMPLE_ROTATION_TOKEN_REPLACE_ME",
"rotation": true,
"rotation_seconds": 120,
"connection_options": {
"udp": {
"host": "203.0.113.10"
},
"custom": {
"host": "proxy.example.com",
"rotation_url": "https://api.example.com/change_ip?token=EXAMPLE_ROTATION_TOKEN_REPLACE_ME"
}
},
"supports_wireguard": true,
"wireguard": {
"state": "active",
"enabled": true,
"pause_reason": null,
"config": "[Interface]\nPrivateKey = EXAMPLE_PRIVATE_KEY\nAddress = 10.77.0.2/32\nDNS = 1.1.1.1\n\n[Peer]\nPublicKey = EXAMPLE_SERVER_KEY\nPresharedKey = EXAMPLE_PRESHARED_KEY\nEndpoint = vpn.example.com:51820\nAllowedIPs = 0.0.0.0/0, ::/0\nPersistentKeepalive = 25\n",
"revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"filename": "gigabit-wireguard-10001.conf",
"qr_data_url": "data:image/png;base64,EXAMPLE_PNG_BASE64"
}
}
]
}
}端口详情
查询属于此账户的订单详情。无权访问或不存在的订单返回 404。
租用到期后,WireGuard 会暂停,配置在 24 小时端口保留期(due)内保留。续租会恢复相同配置,但手动暂停的访问除外。只有 enabled=true 才会解除手动暂停。取消租用并释放端口后,旧配置会被删除。手动暂停 WireGuard 不影响 HTTP(S) 或 SOCKS5。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 端口列表中的订单 ID(id)或端口 ID(port_id)。 |
请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "a1b2c3d4e5f60123456789abcdef0123",
"port_id": "b1c2d3e4f5a60123456789abcdef0123",
"number": 10001,
"host": "l1.gigabit.ltd",
"username": "astra_a1b2c3d4e5f",
"proxy_password": "EXAMPLE_ONLY_22_CHARS_x",
"status": "active",
"expires": "2026-12-09T22:59:59+00:00",
"operator": "Orange",
"cityName": "Warsaw",
"ip": "198.51.100.42",
"speed": {
"mbps": 28.43,
"checked_at": "2026-11-11T12:00:00+00:00"
},
"rotation_url": "https://api.gigabit.ltd/change_ip?token=EXAMPLE_ROTATION_TOKEN_REPLACE_ME",
"rotation": true,
"rotation_seconds": 120,
"connection_options": {
"udp": {
"host": "203.0.113.10"
},
"custom": {
"host": "proxy.example.com",
"rotation_url": "https://api.example.com/change_ip?token=EXAMPLE_ROTATION_TOKEN_REPLACE_ME"
}
},
"supports_wireguard": true,
"wireguard": {
"state": "active",
"enabled": true,
"pause_reason": null,
"config": "[Interface]\nPrivateKey = EXAMPLE_PRIVATE_KEY\nAddress = 10.77.0.2/32\nDNS = 1.1.1.1\n\n[Peer]\nPublicKey = EXAMPLE_SERVER_KEY\nPresharedKey = EXAMPLE_PRESHARED_KEY\nEndpoint = vpn.example.com:51820\nAllowedIPs = 0.0.0.0/0, ::/0\nPersistentKeepalive = 25\n",
"revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"filename": "gigabit-wireguard-10001.conf",
"qr_data_url": "data:image/png;base64,EXAMPLE_PNG_BASE64"
}
}
}端口续租
从余额付款,将一个端口的租期延长 30 天。只需在 URL 中指定端口编号或 ID。
耗时操作返回 HTTP 202 和服务器生成的 id。通过 GET /operations/{id} 查询状态及结果。查询状态不会创建新操作。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 端口编号或端口 ID。也接受 GET /orders 返回的订单 id。 |
请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/10001/renew' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/10001/renew",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/orders/10001/renew",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"id": "partner_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"order_ids": [
"a1b2c3d4e5f60123456789abcdef0123"
],
"amount_cents": 4050,
"currency": "EUR",
"price": {
"currency": "EUR",
"base_net_cents": 4500,
"net_cents": 4050,
"vat_cents": 0,
"total_cents": 4050,
"tax_at_topup": true,
"discount_percent": 10,
"months": 1,
"days": 30,
"pricing_version": 1,
"tax": {
"mode": "vat",
"rate_percent": 23,
"vat_code": "23",
"reverse_charge": false
}
}
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/b1c2d3e4f5a60123456789abcdef0123/renew' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/b1c2d3e4f5a60123456789abcdef0123/renew",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/orders/b1c2d3e4f5a60123456789abcdef0123/renew",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"id": "partner_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"order_ids": [
"a1b2c3d4e5f60123456789abcdef0123"
],
"amount_cents": 4050,
"currency": "EUR",
"price": {
"currency": "EUR",
"base_net_cents": 4500,
"net_cents": 4050,
"vat_cents": 0,
"total_cents": 4050,
"tax_at_topup": true,
"discount_percent": 10,
"months": 1,
"days": 30,
"pricing_version": 1,
"tax": {
"mode": "vat",
"rate_percent": 23,
"vat_code": "23",
"reverse_charge": false
}
}
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}重置 IP 轮换令牌
创建新的 IP 轮换令牌并返回可直接使用的 URL。旧令牌及包含该令牌的所有 URL 会立即失效。代理密码和定时器保持不变。
响应会立即返回,无需后台操作。新 URL 也可从端口的 rotation_url 字段获取。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 端口列表中 id 字段对应的订单 ID。 |
请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation-token' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation-token",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation-token",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"rotation_token": "0123456789abcdef0123456789abcdef",
"rotation_url": "https://api.gigabit.ltd/change_ip?token=0123456789abcdef0123456789abcdef"
}
}按 ID 修改连接凭据
服务器生成新密码。设置 change_login=true 时,还会使用当前合作伙伴前缀生成新登录名。仅适用于有效租用。
新凭据生效后可在 result 中获取。operation_superseded 表示更新的命令已修改凭据。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 端口列表中的订单 ID(id)或端口 ID(port_id)。 |
change_loginJSON 请求体 · 可选 | boolean | true:使用当前前缀生成新登录名和新密码。false:仅更改密码。旧版共享凭据即使未设置此标记,也会转换为独立的登录名和密码。 |
请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/password' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"change_login": true
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/password",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"change_login": true
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/password",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'change_login': True},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"state": "synced",
"username": "astra_b2c3d4e5f6a",
"password": "EXAMPLE_NEW_PASSWORD_xx"
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/password' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"change_login": false
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/password",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"change_login": false
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/password",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'change_login': False},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"state": "synced",
"username": "astra_a1b2c3d4e5f",
"password": "EXAMPLE_NEW_PASSWORD_xx"
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}IP 轮换定时器
当前定时器状态。rotation=true 时包含 rotation_seconds;停用时仅返回 rotation=false。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 端口列表中的订单 ID(id)或端口 ID(port_id)。 |
请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"rotation": true,
"rotation_seconds": 120
}
}请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"rotation": false
}
}定时器设置
设置 rotation=true 和 rotation_seconds 可启用定时器,间隔为 20 至 86400 秒的整数。小于 20 时返回 rotation_interval_too_short。如需停用,仅发送 rotation=false。
在定时器设置确认生效前,操作状态保持 processing。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 端口列表中的订单 ID(id)或端口 ID(port_id)。 |
rotationJSON 请求体 · 必填 | boolean | true 启用定时器;false 停用定时器。 |
rotation_secondsJSON 请求体 · 可选 | integer20-86400 | rotation=true 时必填。rotation=false 时请省略此字段。 |
请求示例
curl --request PUT \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"rotation": true,
"rotation_seconds": 120
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation",
{
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"rotation": true,
"rotation_seconds": 120
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.put(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'rotation': True, 'rotation_seconds': 120},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"rotation": true,
"rotation_seconds": 120
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}请求示例
curl --request PUT \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"rotation": false
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation",
{
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"rotation": false
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.put(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/rotation",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'rotation': False},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"rotation": false
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}获取 WireGuard 配置
返回现有配置和二维码,暂停时也可获取。不会创建配置或启用访问。配置不存在或已删除时返回 wireguard_not_created(404)。
租用到期后,WireGuard 会暂停,配置在 24 小时端口保留期(due)内保留。续租会恢复相同配置,但手动暂停的访问除外。只有 enabled=true 才会解除手动暂停。取消租用并释放端口后,旧配置会被删除。手动暂停 WireGuard 不影响 HTTP(S) 或 SOCKS5。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 订单 ID 或公开的 port_id。 |
请求示例
curl --request GET \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN"const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`
}
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.get(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"state": "active",
"enabled": true,
"pause_reason": null,
"config": "[Interface]\nPrivateKey = EXAMPLE_PRIVATE_KEY\nAddress = 10.77.0.2/32\nDNS = 1.1.1.1\n\n[Peer]\nPublicKey = EXAMPLE_SERVER_KEY\nPresharedKey = EXAMPLE_PRESHARED_KEY\nEndpoint = vpn.example.com:51820\nAllowedIPs = 0.0.0.0/0, ::/0\nPersistentKeepalive = 25\n",
"revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"filename": "gigabit-wireguard-10001.conf",
"qr_data_url": "data:image/png;base64,EXAMPLE_PNG_BASE64"
}
}创建 WireGuard 配置
为有效租用创建配置,或保留已有配置。重复请求不会更改密钥或解除手动暂停。等待 ready 后,使用 GET 获取配置。明确删除后再次创建,会生成新配置。
租用到期后,WireGuard 会暂停,配置在 24 小时端口保留期(due)内保留。续租会恢复相同配置,但手动暂停的访问除外。只有 enabled=true 才会解除手动暂停。取消租用并释放端口后,旧配置会被删除。手动暂停 WireGuard 不影响 HTTP(S) 或 SOCKS5。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 订单 ID 或公开的 port_id。 |
请求示例
curl --request POST \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.post(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"state": "active",
"enabled": true
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}暂停或恢复
enabled=false 仅暂停 WireGuard 并保留密钥。enabled=true 恢复访问,需要有效且已付款的租用。ready 表示服务器已应用更改。
租用到期后,WireGuard 会暂停,配置在 24 小时端口保留期(due)内保留。续租会恢复相同配置,但手动暂停的访问除外。只有 enabled=true 才会解除手动暂停。取消租用并释放端口后,旧配置会被删除。手动暂停 WireGuard 不影响 HTTP(S) 或 SOCKS5。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 订单 ID 或公开的 port_id。 |
enabledJSON 请求体 · 必填 | boolean | false 暂停;true 恢复。 |
请求示例
curl --request PATCH \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"enabled": false
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
{
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"enabled": false
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.patch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'enabled': False},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"state": "paused",
"enabled": false
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}请求示例
curl --request PATCH \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"enabled": true
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
{
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"enabled": true
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.patch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'enabled': True},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"state": "active",
"enabled": true
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}删除 WireGuard 配置
撤销访问并删除 WireGuard 配置,旧配置随即失效。端口及其 HTTP(S)/SOCKS5 服务保留。重复删除是安全的;续租不会重建已删除的配置。
租用到期后,WireGuard 会暂停,配置在 24 小时端口保留期(due)内保留。续租会恢复相同配置,但手动暂停的访问除外。只有 enabled=true 才会解除手动暂停。取消租用并释放端口后,旧配置会被删除。手动暂停 WireGuard 不影响 HTTP(S) 或 SOCKS5。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
id路径 · 必填 | string | 订单 ID 或公开的 port_id。 |
请求示例
curl --request DELETE \
--url 'https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
{
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.delete(
"https://api.gigabit.ltd/api/partner/v1/orders/a1b2c3d4e5f60123456789abcdef0123/wireguard",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "queued",
"error": null,
"result": null,
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}完成后的结果
{
"success": true,
"data": {
"id": "op_0123456789abcdef0123456789abcdef",
"state": "ready",
"error": null,
"result": {
"state": "deleted",
"enabled": false
},
"created_at": "2026-11-10T12:00:00+00:00",
"status_url": "/api/partner/v1/operations/op_0123456789abcdef0123456789abcdef"
}
}登录名前缀
前缀是端口登录名的开头,例如品牌名称。登录名格式为 prefix_random:当 prefix=astra 时,新端口会获得类似 astra_a1b2c3d4e5f 的登录名。每个端口的随机后缀独立生成。
修改前缀不会改变现有登录名。新端口以及通过 change_login=true 更改登录名时使用当前前缀。前缀必须唯一;已被占用时返回 409 partner_prefix_taken。
参数
| 字段 | 类型 | 说明 |
|---|---|---|
prefixJSON 请求体 · 必填 | string2-24 | 2–24 个字符:拉丁字母、数字和连字符,必须以字母开头。统一转换为小写。proxy 和 gigabit 为保留名称。 |
请求示例
curl --request PUT \
--url 'https://api.gigabit.ltd/api/partner/v1/profile' \
--header "Authorization: Bearer $GIGABIT_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"prefix": "astra"
}'const response = await fetch(
"https://api.gigabit.ltd/api/partner/v1/profile",
{
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.GIGABIT_API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"prefix": "astra"
})
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error);
console.log(result);# python -m pip install requests
import os
import requests
response = requests.put(
"https://api.gigabit.ltd/api/partner/v1/profile",
headers={"Authorization": f"Bearer {os.environ['GIGABIT_API_TOKEN']}"},
json={'prefix': 'astra'},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(result.get("error", f"HTTP {response.status_code}"))
print(result)响应示例
{
"success": true,
"data": {
"prefix": "astra"
}
}金额与状态
data 对象的字段。新增字段可能不会引起 API 版本变更。
| 字段 | 类型 | 说明 |
|---|---|---|
balance_cents | integer | 当前未税余额,可为负数。 |
credit_limit_cents | integer | 约定的最大透支额度。 |
reserved_cents | integer | 为未完成操作预留的资金,仍计入余额。 |
available_cents | integer | 可用于订购的资金:余额 + 信用额度 − 预留资金,最低为 0。 |
withdrawable_cents | integer | 扣除预留资金后账户可退款的金额。 |
debt_cents / paid_in_cents | integer | 分别为欠款和已确认充值总额。 |
currency / monthly_net_cents / discount_percent | string / integer | EUR;折扣前的 30 天基础价格;合作伙伴折扣百分比。 |
prices[] / topup_tax | array / object | 30 天价格和充值税务信息。账单资料不完整时,价格为空,且 pricing_error=billing_required。 |
can_order_new_ports | boolean | 可用资金是否足以购买一个端口 30 天。不保证有可用端口。 |
payment_method | string | 充值方式:card(Stripe)。 |
prefix / api_token_hint / connection_domains | string / object | 新登录名前缀、令牌后缀(非令牌本身)以及已配置的 host/api 域名。空字符串表示未配置域名。 |
端口价格
data 对象的字段。新增字段可能不会引起 API 版本变更。
| 字段 | 类型 | 说明 |
|---|---|---|
currency / base_net_cents | string / integer | EUR 和该周期折扣前的基础未税价格。 |
net_cents / total_cents | integer | 应用折扣后该周期单个端口的未税费用,即余额扣款额。 |
vat_cents / tax_at_topup | integer / boolean | 购买时 vat_cents=0 且 tax_at_topup=true:增值税在充值时处理。 |
months / days / discount_percent / pricing_version | integer | 周期为 1 个月(30 天)、专属折扣和价格版本。 |
tax | object | mode、rate_percent、vat_code、reverse_charge。表示充值税务信息,并非端口的额外费用。 |
购买 / 续租操作
data 对象的字段。新增字段可能不会引起 API 版本变更。
| 字段 | 类型 | 说明 |
|---|---|---|
id / state / error | string / null | 操作 ID、状态和错误代码(无错误时为 null)。 |
order_ids[] | string[] | 已创建或续租的订单 ID,用于 GET /orders/{id}。 |
amount_cents / currency / price | integer / string / object | 未税扣款金额、EUR 币种及为该操作保存的端口价格。 |
端口与连接凭据
data 对象的字段。新增字段可能不会引起 API 版本变更。
| 字段 | 类型 | 说明 |
|---|---|---|
id / port_id / number | string / integer | 订单 ID、目录中的端口 ID 和端口编号。 |
host / username / proxy_password | string | 代理连接主机、用户名和密码。 |
status / expires | string | active 或 due;ISO 8601 格式的租用到期时间。 |
operator / cityName / ip | string | 运营商、城市和当前出口 IP。无法获取时 ip 可为空。 |
speed.mbps | number / null | 最近一次 Speedtest 下载速度,单位 Mbps。null 表示测量结果不可用或最近一次测量失败。此请求不会发起新的测速。 |
speed.checked_at | string / null | ISO 8601 格式的最近一次测量尝试时间。即使 speed.mbps=null 也可能存在。无法获取测量时间时为 null。 |
rotation_url | string | 如需更换 IP,请向端口详情返回的完整 rotation_url 发送 GET 请求。无需 Authorization 请求头,因为 URL 已包含端口令牌。 |
rotation / rotation_seconds | boolean / integer | 定时器是否启用;仅在 rotation=true 时包含以秒为单位的间隔。 |
connection_options | object | 已配置时提供的额外连接地址:ip 和 custom 包含 host 与 rotation_url。 |
connection_options.udp.host | string | 支持 UDP 的连接 IP 地址,仅在服务器已配置时返回。此地址替代 host;端口号、用户名、密码和 IP 轮换 URL 不变。速度可能较低。 |
supports_wireguard | boolean | 端口是否支持 WireGuard;目录中也包含此字段。 |
wireguard | object | null | 现有配置和二维码:单个端口详情始终包含,列表需指定 include=wireguard。null 表示无配置、配置已删除或端口不支持。 |
wireguard_error | string | WireGuard 暂时故障不会隐藏端口:wireguard=null,此字段包含原因。 |
IP 轮换定时器
data 对象的字段。新增字段可能不会引起 API 版本变更。
| 字段 | 类型 | 说明 |
|---|---|---|
rotation | boolean | true 表示定时器已启用;false 表示已停用。 |
rotation_seconds | integer | 间隔为 20 至 86400 秒。仅在 rotation=true 时包含。 |
账户充值
data 对象的字段。新增字段可能不会引起 API 版本变更。
| 字段 | 类型 | 说明 |
|---|---|---|
id / state / url | string / null | Stripe:ID、状态、Checkout 链接。支付创建期间 url 可为 null。 |
amount_cents / vat_cents / total_cents / currency | integer / string | Stripe:余额入账金额、增值税、应付总额和 EUR 币种。 |
交易
data 对象的字段。新增字段可能不会引起 API 版本变更。
| 字段 | 类型 | 说明 |
|---|---|---|
items[] / total / offset / limit | array / integer | 记录、应用预留资金筛选后的总数、偏移量和每页记录数。 |
id / created_at / sequence / currency | string / integer | 记录 ID、日期、序列号和 EUR 币种。 |
operation / source | string | 操作类型:topup、purchase、renewal、correction、compensation、credit_limit、withdrawal_reserve、withdrawal_paid、withdrawal_rejected;可按需包含技术性 purchase_reserve/purchase_release。来源:stripe、admin、api、customer、system。 |
amount_cents / reserved_delta_cents | integer | 余额和预留资金的变化。扣款为负数。预留记录可能有 amount_cents=0,不代表充值。 |
balance_after_cents / reserved_after_cents | integer | 此记录之后的余额和预留资金。 |
comment / reference | string / null | 纯文本备注及关联付款或操作。备注可为空。 |
后台操作
data 对象的字段。新增字段可能不会引起 API 版本变更。
| 字段 | 类型 | 说明 |
|---|---|---|
id / status_url | string | 服务器生成的操作 ID 和状态 URL。 |
state | string | queued、processing、ready 或 failed。 |
result | object / null | 操作结果:根据方法不同,可能为连接凭据、订单详情或支付链接。 |
error / created_at | string / null | 适用时的错误代码和操作创建时间。 |
WireGuard 连接
data 对象的字段。新增字段可能不会引起 API 版本变更。
| 字段 | 类型 | 说明 |
|---|---|---|
state / enabled | string / boolean | active 或 paused;enabled 确认访问已启用。 |
pause_reason | string | null | manual 表示手动暂停;rental_expired 表示已付费租期结束;null 表示使用中。 |
config / filename | string | null | WireGuard 配置文件文本和下载文件名。包含私钥:仅交付给端口所有者,切勿公开或写入日志。未保存副本的旧版暂停配置在恢复前可能返回 null。 |
qr_data_url | string | null | 包含相同配置的 PNG 数据,格式为 data:image/png;base64,…。 |
revision | string | null | 当前连接密钥的指纹。 |