tencent cloud

ApplyFreeCertificate
最后更新时间:2025-12-11 14:31:54
ApplyFreeCertificate
最后更新时间: 2025-12-11 14:31:54

1. API Description

Domain name for API request: teo.intl.tencentcloudapi.com.

This API is used to apply for a free certificate. If you need to proceed with DNS delegated verification or file verification, you can call this API to initiate the certificate application and obtain the corresponding verification content based on the application method. The order for API calls is as follows:.
Step 1: Call ApplyFreeCertificate, specify the verification method for free certificate application, and obtain the verification content.
Step 2: Configure the corresponding domain as verification content.
Step 3: Call CheckFreeCertificateVerification to verify. After verification passes, the free certificate application is completed.
Step 4: Call ModifyHostsCertificate to issue a domain certificate configured to use the EdgeOne free certificate.

The application method introduction in the document: Free Certificate Application Description.
description:.

  • Only CNAME access mode can call this API to specify the free certificate application method. NS/DNSPod hosting access modes use automatic validation to apply for free certificates with no need to call this API.
  • If you need to switch the free certificate authentication method, you can call this API again by changing the VerificationMethod field to update it.
  • A domain name can only apply for one free certificate. After calling this API, the backend will trigger the free certificate application task. You need to complete the domain name verification info configuration within 2 days, then finish certificate authentication.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ApplyFreeCertificate.
Version Yes String Common Params. The value used for this API: 2022-09-01.
Region No String Common Params. This parameter is not required.
ZoneId Yes String Site ID.
Domain Yes String Specifies the target domain name for free certificate application.
VerificationMethod Yes String Specifies the verification method for applying for a free certificate. for detailed verification methods, refer to the free certificate application documentation. valid values:.
  • http_challenge: specifies the file validation mode for http access. verifies by getting file information from the specified URL of the access domain to complete free certificate application.
  • dns_challenge: specifies the dns delegation verification method. verifies the free certificate application by adding the designated host record pointing to EdgeOne.


  • Note: after triggering this api, you need to complete the verification content configuration based on the returned verification information. once configured, you must also verify by calling the check free certificate application result api. after verification passes, the application succeeds. once the application is successful, you can call the configure domain name certificate API to deploy a free certificate for the current domain name.

    3. Output Parameters

    Parameter Name Type Description
    DnsVerification DnsVerification Specifies the verification information for free certificate application when VerificationMethod is dns_challenge.
    FileVerification FileVerification Specifies the verification information related to the free certificate application for the domain name when VerificationMethod is http_challenge.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Applying for Free Certificate Using HTTP Access File Validation Mode

    This example shows you how to apply for a free certificate using file validation mode with HTTP access for the domain name (abc.test.com) under the site (ZoneId is zone-2fgd17m17xw).

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ApplyFreeCertificate
    <Common request parameters>
    
    {
        "ZoneId": "zone-2fgd17m17xw",
        "Domain": "abc.test.com",
        "VerificationMethod": "http_challenge"
    }

    Output Example

    {
        "Response": {
            "RequestId": "064a8c04-2d3e-4c9d-9473-39a8f76276ea",
            "FileVerification": {
                "Content": "9i8vhsvt9y8y3sx1s2d",
                "Path": "/.well-known/teo-verification/yvnu7sesms"
            }
        }
    }

    Example2 Applying for a Free Certificate Using DNS Delegation Verification Method

    This example shows you how to apply for a free certificate using the DNS delegated verification method for the domain name (qwe.test.com) under the site (ZoneId is zone-2fgd17m17xw).

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ApplyFreeCertificate
    <Common request parameters>
    
    {
        "ZoneId": "zone-2fgd17m17xw",
        "Domain": "qwe.test.com",
        "VerificationMethod": "dns_challenge"
    }

    Output Example

    {
        "Response": {
            "RequestId": "064a8c04-2d3e-4c9d-9473-39a8f76276ea",
            "DnsVerification": {
                "RecordType": "CNAME",
                "RecordValue": "_acme-challenge",
                "Subdomain": "www.example.com.edgeone.com"
            }
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

    本页内容是否解决了您的问题?
    您也可以 联系销售 提交工单 以寻求帮助。

    文档反馈