跳到正文
Navigation

创建 ACME 证书申请订单(支持 HTTP/TLS/DNS 三种验证方式)

POST
https://your-panel.example.com:8888/acme

创建 Let's Encrypt(或其他 ACME CA)证书申请订单。支持三种验证方式。

Request body application/x-www-form-urlencoded required

  • request_time
    string
    required

    Unix 时间戳。

  • request_token
    string
    required

    按 API 概览生成的签名。

  • action
    apply_cert_api
    required

    具体操作名称。

  • id
    integer
    required

    关联网站 ID

  • domains
    string
    required

    JSON 数组,要申请的域名列表 ["example.com","www.example.com"]

  • auth_type
    string
    required

    验证方式:http(文件)、tls(TLS)、dns(DNS)

  • auth_to
    string
    required

    验证路径。HTTP/TLS 传网站目录;DNS 验证传 dns

  • auto_wildcard
    optional
    string

    "1" 自动申请泛域名 *.example.com

  • ca
    optional
    string

    CA 标识,默认 Let's Encrypt

Returns

default

接口响应,业务状态见下方详细说明。

JSON
  • status
    optional
    string

    pending 订单待验证

  • index
    optional
    string

    订单索引 ID,后续操作需要

  • domains
    optional
    array of
    unknown

    申请的域名列表

  • authorizations
    optional
    array of
    unknown

    Let's Encrypt 授权 URL 列表

  • expires
    optional
    integer

    订单过期时间戳

  • create_time
    optional
    integer

    创建时间戳

各操作详细说明

apply_cert_apiaction=apply_cert_api创建 ACME 证书申请订单(支持 HTTP/TLS/DNS 三种验证方式)

创建 Let's Encrypt(或其他 ACME CA)证书申请订单。支持三种验证方式。

  • 路由:POST /acme
  • action:apply_cert_api

输入参数

参数名称 必选 类型 描述
action 是 String 固定值 apply_cert_api
id 是 Integer 关联网站 ID
domains 是 String JSON 数组,要申请的域名列表 ["example.com","www.example.com"]
auth_type 是 String 验证方式:http(文件)、tls(TLS)、dns(DNS)
auth_to 是 String 验证路径。HTTP/TLS 传网站目录;DNS 验证传 dns
auto_wildcard 否 String "1" 自动申请泛域名 *.example.com
ca 否 String CA 标识,默认 Let's Encrypt

提示:auth_type=dns, auth_to=dns 时仅创建订单。需再用 apply_dns_auth 完成 DNS TXT 记录创建和验证。

输出参数

参数名称 类型 描述
status String pending 订单待验证
index String 订单索引 ID,后续操作需要
domains Array 申请的域名列表
authorizations Array Let's Encrypt 授权 URL 列表
expires Integer 订单过期时间戳
create_time Integer 创建时间戳

示例

请求(DNS 验证)

POST /acme HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded

action=apply_cert_api&id=1&domains=["dnstest.cc"]&auth_type=dns&auth_to=dns

响应

{
  "status": "pending",
  "index": "a7a0472c4a5061ec83450119b874a5d3",
  "domains": ["dnstest.cc"],
  "auth_type": "dns",
  "expires": 1780111135,
  "create_time": 1779506335,
  "authorizations": ["https://acme-v02.api.letsencrypt.org/acme/authz/..."]
}

相关接口

Type to search…

↑↓ navigate↵ selectEsc close