Dynadot是通过ICANN认证的域名注册商,自2002年成立以来,服务于全球108个国家和地区的客户,为数以万计的客户提供简洁,优惠,安全的域名注册以及管理服务。
Dynadot平台操作教程索引(包括域名邮箱,解析,建站,优惠长期更新)
Dynadot.com提供的API是专为效率而构建的高级域名管理和获取工具包。在Dynadot平台上,我们提供了50多个命令来设置,管理,注册和竞标域名。
在了具体的功能API代码前,请阅读关于Dynadot的API使用须知。
在用户想要全面了解自己的用户信息时,使用Dynadot API可以详尽地查询自己的账户信息。
当需要查询自己账户的信息时,只需要在输入命令之后并不需要额外的参数。
在成功发送信息查询命令之后,返回的结果将以XML或是JSON格式的标签返回,其中XML的结果标签所代表含义由下图所示:
XML结果标签 | 解释 |
| 响应XML文档的根节点 |
| 响应标头 |
| 如果操作成功,"0"为成功,"-1"为失败 |
| 请求状态 |
| 请求错误信息,仅状态为"error"时使用 |
| 响应内容 |
| 账户信息 |
| 用户名 |
| 论坛名称 |
| 联系方式信息 |
| 整理与归纳 |
| 响应标头 |
| 您的名称 |
| 邮箱 |
| 国家区号 |
| 电话号码 |
| 第1行地址 |
| 第2行地址 |
| 城市 |
| 州 |
| 邮政区代码 |
| 国家 |
| 客户身份始于 |
| 账户锁定 |
| 花费总计 |
| 价格级别 |
| 账户余额 |
| 自定义时区 |
| 默认设置 |
| 默认Whois |
| 默认注册人 |
| 联络人ID |
| 默认管理员 |
| 默认技术类型 |
| 默认账单 |
| 域名服务器类型 |
| 是否带有广告 |
此处,使用API发送账户信息查询命令account_info。
将高级域API请求发送到以下URL:https://api.dynadot.com/api3.xml。
则最后返回的参数为:
请求(XML格式)
https://api.dynadot.com/api3.xml?key=mykey&command=account_info
响应(XML格式)
- "1.0" encoding="UTF-8"?>
-
- <AccountInfoResponse>
-
- <AccountInfoHeader>
-
- <ResponseCode>0ResponseCode>
-
- <Status>successStatus>
-
- AccountInfoHeader>
-
- <AccountInfoContent>
-
- <AccountInfo>
-
- <Username>testnameUsername>
-
- <ForumName>test forum nameForumName>
-
- <Contact>
-
- <Organization/>
-
- <Name>testname testName>
-
- <Email>test@test.comEmail>
-
- <PhoneCc>1PhoneCc>
-
- <PhoneNum>555.555.5233PhoneNum>
-
- <FaxCc/>
-
- <FaxNum/>
-
- <Address1>1 test roadAddress1>
-
- <Address2/>
-
- <City>Los AngelesCity>
-
- <State>CAState>
-
- <ZipCode>90000ZipCode>
-
- <Country>USCountry>
-
- Contact>
-
- <CustomerSince>1364888735253CustomerSince>
-
- <AccountLock>onAccountLock>
-
- <TotalSpending>$0.00TotalSpending>
-
- <PriceLevel>Regular PricingPriceLevel>
-
- <AccountBalance>$70.02AccountBalance>
-
- <CustomTimeZone>PSTCustomTimeZone>
-
- <DefaultSettings>
-
- <DefaultWhois>
-
- <DefaultRegistrant>
-
- <ContactId>0ContactId>
-
- DefaultRegistrant>
-
- <DefaultAdmin>
-
- <ContactId>0ContactId>
-
- DefaultAdmin>
-
- <DefaultTechnical>
-
- <ContactId>0ContactId>
-
- DefaultTechnical>
-
- <DefaultBilling>
-
- <ContactId>0ContactId>
-
- DefaultBilling>
-
- DefaultWhois>
-
- <DefaultNameServerSettings>
-
- <Type>Dynadot ParkingType>
-
- <WithAds>yesWithAds>
-
- DefaultNameServerSettings>
-
- DefaultSettings>
-
- AccountInfo>
-
- AccountInfoContent>
-
- AccountInfoResponse>
请求(JSON格式)
https://api.dynadot.com/api3.json?key=mykey&command=account_info
响应(JSON格式)
- {
-
- "AccountInfoResponse": {
-
- "ResponseCode": 0,
-
- "Status": "success",
-
- "AccountInfo": {
-
- "Username": "testname",
-
- "ForumName": "test forum name",
-
- "Contact": {
-
- "Organization": "",
-
- "Name": "testname test",
-
- "Email": "test@test.com",
-
- "PhoneCc": "1",
-
- "PhoneNum": "555.555.5233",
-
- "FaxCc": "",
-
- "FaxNum": "",
-
- "Address1": "1 test road",
-
- "Address2": "",
-
- "City": "Los Angeles",
-
- "State": "CA",
-
- "ZipCode": "90000",
-
- "Country": "US"
-
- },
-
- "CustomerSince": "1364888735253",
-
- "AccountLock": "on",
-
- "TotalSpending": "$0.00",
-
- "PriceLevel": "Regular Pricing",
-
- "AccountBalance": "$70.02",
-
- "CustomTimeZone": "PST",
-
- "DefaultSettings": {
-
- "DefaultWhois": {
-
- "DefaultRegistrant": {
-
- "ContactId": "0"
-
- },
-
- "DefaultAdmin": {
-
- "ContactId": "0"
-
- },
-
- "DefaultTechnical": {
-
- "ContactId": "0"
-
- },
-
- "DefaultBilling": {
-
- "ContactId": "0"
-
- }
-
- },
-
- "DefaultNameServerSettings": {
-
- "Type": "Dynadot Parking",
-
- "WithAds": "yes"
-
- }
-
- }
-
- }
-
- }
-
- }
在网页中,其显示样式如下:(示例为实际操作。)
XML格式
JSON格式