Appearance
创建 ACME EAB
POST
/openapi/v3/orders/:id/acme-eab
获取订单的 ACME EAB(External Account Binding)凭证;订单尚未创建过 EAB 时自动创建。重复调用返回现有凭证,不会重复创建。
EAB 凭证(eab_kid + eab_mac_key)配合返回的 directory(ACME Directory URL),用于 ACME 客户端注册账户(newAccount)。本文示例中的 Directory URL 仅为示例地址,以接口实际返回的 directory 为准。
Path 参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | string | 是 | 订单 ID |
返回数据
| 参数名称 | 类型 | 描述 |
|---|---|---|
| order_id | string | 订单 ID |
| directory | string | 该订单的 ACME Directory URL |
| eab_kid | string | EAB Key ID |
| eab_mac_key | string | EAB MAC Key。仅在创建成功时返回一次,existing=true 时不返回,请妥善保存 |
| existing | bool | 是否为已存在的 EAB。true 表示本次返回的是既有凭证 |
| white_ips | array[string] | 当前生效的 IP 白名单;空数组表示不限制来源 IP |
凭证安全
eab_mac_key 只在创建时下发一次,服务端不保留明文。丢失后只能通过轮换 EAB获取新凭证。
bash
curl -X POST 'https://api.certcloud.cn/openapi/v3/orders/TIT6R0qv/acme-eab' \
-H 'X-CC-Auth-Key: your-auth-key' \
-H 'X-CC-Key-ID: your-key-id'首次创建成功:
订单已有 EAB 时重复调用:
错误说明
| 编号 | code | HTTP | 说明 |
|---|---|---|---|
| 19505 | order_not_found | 400 | 订单不存在,或不属于当前 API 账户 |
| 33020 | 33020 | 400 | 当前订单状态无法生成 ACME EAB(如订单已取消、过期或无可用域名) |
| 33074 | 33074 | 400 | 该产品目前不支持 ACME |
| 33181 | order_org_validation_not_passed_for_acme_eab | 400 | 订单组织验证未通过,无法生成 ACME EAB |
通用错误(unauthenticated_request、permission_denied 等)见错误码说明。本接口无接口级限流,仅受全局限流保护。
