tencent cloud

文档反馈

CreateCertificate

最后更新时间:2023-12-01 16:21:33

    1. API Description

    Domain name for API request: ssl.tencentcloudapi.com.

    This API is used to purchase a certificate.

    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: CreateCertificate.
    Version Yes String Common Params. The value used for this API: 2019-12-05.
    Region No String Common Params. This parameter is not required for this API.
    ProductId Yes Integer Certificate product ID. 3: SecureSite EV Pro; 4: SecureSite EV; 5: SecureSite OV Pro; 6: SecureSite OV; 7: SecureSite OV wildcard; 8: GeoTrust EV; 9: GeoTrust OV; 10: GeoTrust OV wildcard; 11: TrustAsia DV multi-domain; 12: TrustAsia DV wildcard; 13: TrustAsia OV wildcard D3; 14: TrustAsia OV D3; 15: TrustAsia OV multi-domain D3; 16: TrustAsia EV D3; 17: TrustAsia EV multi-domain D3; 18: GlobalSign OV; 19: GlobalSign OV wildcard; 20: GlobalSign EV; 21: TrustAsia OV wildcard multi-domain D3; 22: GlobalSign OV multi-domain; 23: GlobalSign OV wildcard multi-domain; 24: GlobalSign EV multi-domain; 25 WoTrus DV; 26: WoTrus DV multi-domain; 27: WoTrus DV wildcard; 28: WoTrus OV; 29: WoTrus OV multi-domain; 30: WoTrus OV wildcard; 31: WoTrus EV; 32: WoTrus EV multi-domain; 33: DNSPod SM2 DV; 34: DNSPod SM2 DV multi-domain; 35: DNSPod SM2 DV wildcard; 37: DNSPod SM2 OV; 38: DNSPod SM2 OV multi-domain; 39: DNSPod SM2 OV wildcard: 40: DNSPod SM2 EV; 41: DNSPod SM2 EV multi-domain; 42: TrustAsia DV wildcard multi-domain.
    DomainNum Yes Integer Number of domains associated with the certificate
    TimeSpan Yes Integer Certificate validity period. Currently, you can only purchase 1-year certificates.

    3. Output Parameters

    Parameter Name Type Description
    CertificateIds Array of String List of certificate IDs
    DealIds Array of String List of order IDs
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Purchasing a certificate

    This example shows you how to purchase a certificate.

    Input Example

    https://ssl.tencentcloudapi.com/?Action=CreateCertificate
    &ProductId=25
    &DomainNum=1
    &TimeSpan=1
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "CertificateIds": [
                "gf16kv3A"
            ],
            "DealIds": [
                "20200923877000003022941"
            ],
            "RequestId": "5a3d8310-3d7e-42d3-923a-b81407fe495e"
        }
    }
    

    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

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation.AuthError You do not have permission to perform this operation.
    FailedOperation.CannotGetOrder Failed to get order information. Try again later.
    FailedOperation.InvalidParam Incorrect parameters.
    InternalError Internal error.
    InternalError.BackendResponseError An error occurred with the backend service response.
    InvalidParameter The parameter is incorrect.
    InvalidParameterValue Invalid parameter value.
    MissingParameter Missing parameter.