Use this endpoint to generate a new random value to use for domain control validation (DCV) for a domain submitted for OV or EV validation. Use the returned token to validate the domain using the DCV method set for the domain (http-txt-token
, dns-txt-token
, or dns-cname-token
).
Calling this endpoint for a domain where the DCV method is not set or does not require a token returns an invalid_dcv_method
error.
Related topics:
This endpoint only generates DCV tokens for OV and EV domains. To generate a DCV token for a DV domain, use the DV SSL: Generate DCV token endpoint.
curl --request POST 'https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/token' \
--header 'X-DC-DEVKEY: {{api_key}}'
import requests
import json
url = "https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/token"
payload={}
headers = {
'X-DC-DEVKEY': {{api_key}}
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/token"
method := "POST"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-DC-DEVKEY", {{api_key}})
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/token',
'headers': {
'X-DC-DEVKEY': {{api_key}}
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
{
"token": "fdy6m0wy5lq063sz4h0r6qmdt722gyfc",
"expiration_date": "2020-08-22T20:21:10+00:00"
}
{
"token": "47xj51xh3776thgjgtgq99qw7gy6sx8d",
"expiration_date": "2020-08-22T19:48:22+00:00",
"http_token_url": "http://example.com/.well-known/pki-validation/fileauth.txt",
"verification_value": "http://example.com/.well-known/pki-validation/fileauth.txt"
}
{
"token": "vq4k16kwn69rjxgfw4hf2xn8b36ht119",
"expiration_date": "2020-08-22T20:22:26+00:00",
"verification_value": "dcv.digicert.com"
}
{
"errors": [
{
"code": "invalid_dcv_method",
"message": "This domain's DCV method is set incorrectly for this action."
}
]
}
Name | Opt/Req | Type | Description |
---|---|---|---|
validations Deprecated* |
ignored | array |
List of validation types for the domain. *DigiCert has deprecated the validations request parameter. We ignore this parameter in calls to the OV/EV SSL: Generate DCV token endpoint.
|
.. type | ignored | string |
Validation type identifier. See Glossary – Validation types. |
Name | Type | Description |
---|---|---|
token | string |
Random value used to validate domain control for domains using the dns-txt-token , http-token , or dns-cname-token DCV methods.
|
expiration_date | string |
Date and time when the token expires. Format: UTC timezone and ISO 8601 date |
http_token_url | string |
For domains using the http-token DCV method, the URL path where the fileauth.txt file should be placed on the web server.Not returned for domains using other DCV methods. |
verification_value | string |
For domains using the dns-cname-token DCV method, the domain to use in your CNAME record. For more information, see Use the DNS CNAME validation method to verify domain control.For domains using the http-token DCV method, the URL path where the fileauth.txt file should be placed on the web server.Not returned for domains using the dns-txt-token DCV method.
|