DV SSL: Generate DCV token

PUT https://www.digicert.com/services/v2/order/certificate/{{order_id}}/dcv-random-value
Use this endpoint to request the domain control validation (DCV) random value for a DV, OV, or EV TLS certificate order using a DCV method of dns-txt-token, dns-cname-token, or http-token. This value is required to prove domain ownership before the certificate can be issued.

If a valid order random value already exists, DigiCert returns the existing random value instead of generating a new one. If the existing order random value is expired, DigiCert generates a new random value and returns it in the API response.

Use the order random value to complete the DCV check for any domains submitted for validation with the order.

DCV random value has an expiration date, which is provided in the API response (“expiration_date”: “YYYY-MM-DDTHH:MM:SSZ”). Ensure that domain validation is completed before this date to avoid validation failures.

Example requests and responses

curl -X PUT \
  'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/dcv-random-value' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
import requests

url = "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/dcv-random-value"

payload = ""
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/dcv-random-value"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
var request = require("request");

var options = { method: 'PUT',
  url: 'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/dcv-random-value',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

200 OK

{
  "dcv_random_value": "fjqr7th5ds",
  "expiration_date": "2023-02-24T16:25:52+00:00"
}

Response parameters

NameTypeDescription
dcv_random_valuestringRandom value used to validate domain control.
expiration_datestringDate and time the random value expires. UTC timezone, ISO 8601 format.