- 首页
- Help
- Integrations & APIs
- API文档
CyberSSL API Documentation
Our API is designed to have predictable, resource-oriented URLs and to use HTTP requests.
注意
出现错误时,将返回 'error_code' 和 'error_message' 变量。
所有 API 响应均采用 JSON 编码。
You can find the php class and code examples at: https://github.com/cyberssl
目录
- 授权
- 产品列表
- 添加 SSL 订单
- 重新签发现有 SSL 订单
- 验证 CSR
- 获取域名验证选项
- 更改验证方式
- 订单状态
- 获取 SSL 产品价格
- 获取余额
- My orders
- SSL 证书列表
- 订购额外域名
- 获取 SSL 产品详情
- 重新验证
Test API: https://api.cyberssl.com/sandbox/v1/
Live API: https://api.cyberssl.com/v1/
Auth Key: https://www.cyberssl.com/profile_settings
1. 授权
https://api.cyberssl.com/v1/auth 请求方法:GET
请求参数:
- apikey - 您在个人资料设置页面中的 API 密钥 (必填)
响应:
- token - 当前 API 会话的唯一令牌
- success=true
2. 产品列表
https://api.cyberssl.com/v1/list_products 请求方法:GET
请求参数:
- token - 您的唯一令牌 (必填)
响应:
- ssl_products - SSL 产品列表
- success=true
3. 添加 SSL 订单
https://api.cyberssl.com/v1/add_ssl_order 请求方法:POST
请求参数:
- token - 您的唯一令牌 (必填)
- product_id - SSL 产品 ID (必填)
- order_type - 'new' 或 'renew' (必填)
- period - 以年为单位 (必填)
- dv_method - method - 'http', 'https', 'dns' . For email validation method use 'email:' followed by email list separated by commas for every domain, example: 'email:[email protected],[email protected]' (required)
- addon_domains - additional domains field, example: 'domain1.com,domain2.com,*.domain3.com' - used for a Multi-domain certificate - (not required)
- admin_firstname (必填)
- admin_lastname (必填)
- admin_phone (必填)
- admin_title(必填)
- admin_email(必填)
- tech_firstname - 如未提供,则与 admin_firstname 相同
- tech_lastname - 如未提供,则与 admin_lastname 相同
- tech_phone - 如未提供,则与 admin_phone 相同
- tech_title - 如未提供,则与 admin_title 相同
- tech_email - 如未提供,则与 admin_email 相同
- csr - 您的 CSR 代码 (未使用 'csr_*' 字段时必填)
- csr_city - 用于生成 CSR 的城市字段 (未提供 'csr' 字段时必填)
- csr_state - 用于生成 CSR 的州/省字段 (未提供 'csr' 字段时必填)
- csr_country - 用于生成 CSR 的国家字段 (未提供 'csr' 字段时必填)
- csr_domain - 用于生成 CSR 的通用名称字段(您的主域名)(未提供 'csr' 字段时必填)
- csr_organization - 用于生成 CSR 的组织字段 (未提供 'csr' 字段时必填)
- csr_department - (选填)
- csr_email - (选填)
- org_name - 组织全称 (企业验证证书必填)
- org_division - 组织部门 (企业验证证书必填)
- org_addressline - 组织地址 (企业验证证书必填)
- org_city - 组织所在城市 (企业验证证书必填)
- org_country - 组织所在国家 (企业验证证书必填)
- org_phone - 组织电话 (企业验证证书必填)
- org_postalcode - 组织邮政编码 (企业验证证书必填)
- org_region - 组织所在地区 (企业验证证书必填)
响应:
- order_id - 唯一订单 ID
- csr_code - 仅在 CSR 由 CyberSSL API 自动生成时返回
- private_key - 仅在 CSR 由 CyberSSL API 自动生成时返回
- dv_options - 仅在 dv_method 为 http/https/dns 时提供
响应示例:Array ( [http] => Array ( [test.com] => Array ( [filename] => F50E098C713586FE9A363B33BACDD249.txt [content] => b056c5e3252182a844b80e1eb5de04736c09c9d9 [link] => http://test.com/F50E098C713586FE9A.txt ) ) [https] => Array ( [test.com] => Array ( [filename] => F50E098C713586FE9A363B33BACDD249.txt [content] => b056c5e3252182a844b80e1eb5de04736c09c9d9 [link] => https://test.com/F50E098C713586FE9A.txt ) ) [dns] => Array ( [test.com] => Array ( [record] => F50E098C713586FE9A363B33BACDD249.test.com. CNAME b056c5e3252182a844b80e1eb5de04736c09c9d9.comodoca.com. ) ) } - success=true
4. 重新签发现有 SSL 订单
https://api.cyberssl.com/v1/reissue_ssl_order 请求方法:POST
请求参数:
- token - 您的唯一令牌 (必填)
- order_id - 您的唯一 order_id (必填)
- dv_method - method - 'http', 'https', 'dns'. For email validation method use 'email:' followed by email list separated by commas for every domain, example: 'email:[email protected],[email protected]' (required)
- addon_domains - additional domains field, example: 'domain1.com,domain2.com,*.domain3.com' - used for a Multi-domain certificate - (not required)
- csr - 您的 CSR 代码 (未使用 'csr_*' 字段时必填)
- csr_city - 用于生成 CSR 的城市字段 (未提供 'csr' 字段时必填)
- csr_state - 用于生成 CSR 的州/省字段 (未提供 'csr' 字段时必填)
- csr_country - 用于生成 CSR 的国家字段 (未提供 'csr' 字段时必填)
- csr_domain - 用于生成 CSR 的通用名称字段(您的主域名)(未提供 'csr' 字段时必填)
- csr_organization - 用于生成 CSR 的组织字段 (未提供 'csr' 字段时必填)
- csr_department - 用于生成 CSR 的部门字段 (未提供 'csr' 字段时必填)
- csr_email - 用于生成 CSR 的电子邮件字段(未提供 'csr' 字段时必填)
响应:
- order_id - 唯一订单 ID
- csr_code - 仅在 CSR 由 CyberSSL API 自动生成时返回
- private_key - 仅在 CSR 由 CyberSSL API 自动生成时返回
- dv_options - 仅在 dv_method 为 http/https/dns 时提供
响应示例:Array ( [http] => Array ( [test.com] => Array ( [filename] => F50E098C713586FE9A363B33BACDD249.txt [content] => b056c5e3252182a844b80e1eb5de04736c09c9d9 [link] => http://test.com/F50E098C713586FE9A.txt ) ) [https] => Array ( [test.com] => Array ( [filename] => F50E098C713586FE9A363B33BACDD249.txt [content] => b056c5e3252182a844b80e1eb5de04736c09c9d9 [link] => https://test.com/F50E098C713586FE9A.txt ) ) [dns] => Array ( [test.com] => Array ( [record] => F50E098C713586FE9A363B33BACDD249.test.com. CNAME b056c5e3252182a844b80e1eb5de04736c09c9d9.comodoca.com. ) ) } - success=true
5. 验证 CSR
https://api.cyberssl.com/v1/validate_csr 请求方法:POST
请求参数:
- token - 您的唯一令牌 (必填)
- csr - 您的 CSR 代码 (必填)
- product_id - 您的唯一 product_id,用于验证 CSR 是否与产品匹配,选填
- addon_domains - SAN 域名字符串;可用于验证特定产品的 SAN 字符串
响应:
- csr
响应示例:[csr] => Array ( [common_name] => test.com [organization] => test organization [department] => it dep [city] => test [state] => test [country] => BS [email] => [email protected] [san] => [type] => RSA [keysize] => 2048 [total_domains] => 1 ) - success=true
6. 获取域名验证选项
https://api.cyberssl.com/v1/get_dv_options 请求方法:GET
请求参数:
- token - 您的唯一令牌 (必填)
- order_id - 您的唯一 order_id (必填)
- dv_method - 'all'、'http'、'https'、'dns' 或 'email' (必填)
响应:
- order_id - 您的唯一 order_id
- dv_options
响应示例:[dv_options] => Array ( [http] => Array ( [mysite.com] => Array ( [filename] => 38ED81977C297795C94A10272D791CD4.txt [content] => b354ed749af42a09f09edf4b21ff516a698 [link] => http://mysite.com/38ED81977C2.txt ) ) [https] => Array ( [mysite.com] => Array ( [filename] => 38ED81977C297795C94A10272D791CD4.txt [content] => b354ed749af42a09f09edf4b21ff516a698cf0 [link] => https://mysite.com/38ED81977C297.txt ) ) [dns] => Array ( [mysite.com] => Array ( [record] => 38ED81977C297795C94A10272D791CD4.mysite.com. CNAME b354ed749af42a09f09ed.comodoca.com. ) ) [email] => Array ( [mysite.com] => Array ( [0] => [email protected] [1] => [email protected] [2] => [email protected] [3] => [email protected] [4] => [email protected] [5] => [email protected] ) ) ) - success=true
7. 更改验证方式
https://api.cyberssl.com/v1/change_dv_method 请求方法:POST
请求参数:
- token - 您的唯一令牌 (必填)
- order_id - 您的唯一 order_id (必填)
- domain - 域名;如未指定,则使用主域名
- dv_method - 'http'、'https'、'dns' 或 'email'。(必填)
- email (仅当 dv_method 为 'email' 时必填)
响应:
- dv_options - 仅在 dv_method 为 http/https/dns 时提供
响应示例:Array ( [http] => Array ( [test.com] => Array ( [filename] => F50E098C713586FE9A363B33BACDD249.txt [content] => b056c5e3252182a844b80e1eb5de04736c09c9d9 [link] => http://test.com/F50E098C713586FE9A.txt ) ) [https] => Array ( [test.com] => Array ( [filename] => F50E098C713586FE9A363B33BACDD249.txt [content] => b056c5e3252182a844b80e1eb5de04736c09c9d9 [link] => https://test.com/F50E098C713586FE9A.txt ) ) [dns] => Array ( [test.com] => Array ( [record] => F50E098C713586FE9A363B33BACDD249.test.com. CNAME b056c5e3252182a844b80e1eb5de04736c09c9d9.comodoca.com. ) ) } - success=true
8. 订单状态
https://api.cyberssl.com/v1/order_status 请求方法:GET
请求参数:
- token - 您的唯一令牌 (必填)
- order_id - 您的唯一 order_id (必填)
响应:
- valid_from - 格式(YYYY-MM-DD)
- valid_till - 格式(YYYY-MM-DD)
- status - 'Processing'、'Activated'、'Rejected'、'Cancelled'、'Duplicate Certificate'、'Awaiting Activation'、'Awaiting Validation' 或 'Expired'
- amount - 您的 SSL 价格
- primary_domain
- period - 以年为单位
- csr
- certificate
- certificate_chain
- domains_included
- software_name
- dv_method
- partner_order_id
- Contacts - 数组
示例:[contacts] => Array ( [admin_firstname] => John [admin_phone] => 0042321313 [admin_lastname] => Smith [admin_title] => IT manager [admin_email] => [email protected] [tech_firstname] => John [tech_phone] => 0042321313 [tech_lastname] => Smith [tech_title] => IT manager [tech_email] => [email protected] [org_name] => [org_division] => [org_addressline] => [org_city] => [org_country] => [org_phone] => [org_postalcode] => [org_region] => ) - order_id
- order_link - 下载/管理证书的链接
- success=true
9. 获取 SSL 产品价格
https://api.cyberssl.com/v1/get_ssl_product_price请求方法:GET
请求参数:
- token - 您的唯一令牌 (必填)
- period - 列表中的期限 (必填)
- product_id - SSL product_id (必填)
- nr_domains - 受保护的域名数量,默认值 - 1(适用于 SAN 证书)
响应:
- amount - 您的 SSL 价格
- success=true
10. 获取余额
https://api.cyberssl.com/v1/get_balance 请求方法:GET
请求参数:
- token - 您的唯一令牌 (必填)
响应:
- balance - 您的余额
- success=true
11. 我的订单
https://api.cyberssl.com/v1/my_orders 请求方法:GET
请求参数:
- token - 您的唯一令牌 (必填)
响应:
- ssl_orders - 您的 SSL 订单列表
- success=true
12. SSL 证书列表
https://api.cyberssl.com/v1/ssl_certificates 请求方法:GET
响应:
- ssl_products - SSL 产品列表
- success=true
13. 订购额外域名
https://api.cyberssl.com/v1/order_extra_domains 请求方法:GET
请求参数:
- token - 您的唯一令牌 (必填)
- order_id - 您的唯一 order_id (必填)
- extra_domains_nr - 额外域名数量 (必填)
响应:
- amount - 订单金额
- order_id
- success=true
14. 获取 SSL 产品详情
https://api.cyberssl.com/v1/get_ssl_product_details 请求方法:GET
请求参数:
- token - 您的唯一令牌 (必填)
- product_id - SSL 产品 ID (必填)
响应:
- Product - 产品详情数组
示例:[product] => Array ( [product_id] => 17 [name] => Sectigo PositiveSSL [type] => SSL [brand] => sectigo [price_for_3year] => 20 [price_for_2year] => 10 [price_for_1year] => 5 [validation_type] => dv [is_trial] => [is_multi_domain] => [is_wildcard] => [warranty] => 10000 [www_included] => 1 [multidomains_maximum] => 1 [multidomains_included] => 0 [unlimited_server] => 1 [organization_required] => ) - success=true
15. 重新验证域名所有权方式(SSL)。
https://api.cyberssl.com/v1/revalidate 请求方法:GET
请求参数:
- token - 您的唯一令牌 (必填)
- order_id - SSL 订单 ID (必填)
- domain_name - 需要重新验证的域名 (必填)
响应:
- success=true


