Calls the GetTxtRecordForVerify operation to generate a TXT record. The record is used to retrieve domain names and subdomain names, add the subdomain name verification function, and perform batch retrieval.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetTxtRecordForVerify

The operation that you want to perform. Set the value to GetTxtRecordForVerify.

DomainName String Yes example.com

The domain name.

Type String Yes ADD_SUBDOMAIN

The function verified by using the TXT record. Valid values:

  • ADD_SUBDOMAIN
  • RETRIEVAL
Lang String No en

The language type.

Response parameters

Parameter Type Example Description
DomainName String example.com

The domain name.

Note If you do not specify this parameter, it is not returned.
RR String aliyunRetrieval

The host record.

RequestId String 9CC0D642-49D4-48DE-A1A5-9F218652E4A7

The ID of the request.

Value String c99419e6997f41daaa3e*****

The value of the DNS record.

Note The validity period is three days.

Examples

Sample requests


http(s)://alidns.aliyuncs.com/?Action=GetTxtRecordForVerify
&DomainName=example.com
&Type=ADD_SUBDOMAIN
&<Common request parameters>

Sample success responses

XML format

<GetTxtRecordForVerifyResponse>
      <RequestId>9CC0D642-49D4-48DE-A1A5-9F218652E4A7</RequestId>
      <DomainName>example.com</DomainName>
      <RR>aliyunRetrieval</RR>
      <Value>c99419e6997f41daaa3eS*****</Value>
</GetTxtRecordForVerifyResponse>

JSON format

{
	"RR":"aliyunRetrieval",
	"Value":"c99419e6997f41daaa3eS*****",
	"RequestId":"9CC0D642-49D4-48DE-A1A5-9F218652E4A7",
	"DomainName":"example.com"
}

Error codes

For a list of error codes, visit the API Error Center.