<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lưu trữ domain api vietnam - Hướng dẫn TENTEN</title>
	<atom:link href="https://help.tenten.vn/tag/domain-api-vietnam/feed/" rel="self" type="application/rss+xml" />
	<link>https://help.tenten.vn/tag/domain-api-vietnam/</link>
	<description>Tài liệu hỗ trợ khách hàng</description>
	<lastBuildDate>Fri, 13 Jun 2025 03:10:24 +0000</lastBuildDate>
	<language>vi</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://help.tenten.vn/wp-content/uploads/2023/09/favicontenten.png</url>
	<title>Lưu trữ domain api vietnam - Hướng dẫn TENTEN</title>
	<link>https://help.tenten.vn/tag/domain-api-vietnam/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Hướng dẫn tích hợp TenTen Domain API &#8211; Quản lý tên miền tự động 2025</title>
		<link>https://help.tenten.vn/huong-dan-tich-hop-tenten-domain-api-quan-ly-ten-mien-tu-dong-2025/</link>
		
		<dc:creator><![CDATA[Nguyễn Hoàng Minh]]></dc:creator>
		<pubDate>Fri, 13 Jun 2025 03:10:24 +0000</pubDate>
				<category><![CDATA[Đại Lý]]></category>
		<category><![CDATA[api tên miền]]></category>
		<category><![CDATA[dns api]]></category>
		<category><![CDATA[domain api vietnam]]></category>
		<category><![CDATA[domain registration api]]></category>
		<category><![CDATA[quản lý domain api]]></category>
		<category><![CDATA[tenten api]]></category>
		<category><![CDATA[tenten domain]]></category>
		<category><![CDATA[whois api]]></category>
		<category><![CDATA[đăng ký tên miền api]]></category>
		<guid isPermaLink="false">https://help.tenten.vn/?p=14397</guid>

					<description><![CDATA[<p>Mục lục 1. Tổng quan 2. Cấu hình 3. Các API Endpoints 4. Dữ liệu tham chiếu 5. Cách sử dụng 6. Ví dụ code mẫu 7. Lưu ý quan trọng 8. Xử lý lỗi 9. Bảo mật Tổng quan Dự án này cung cấp các API để tương tác với dịch vụ tên miền &#8230;</p>
<p>Bài viết <a href="https://help.tenten.vn/huong-dan-tich-hop-tenten-domain-api-quan-ly-ten-mien-tu-dong-2025/">Hướng dẫn tích hợp TenTen Domain API &#8211; Quản lý tên miền tự động 2025</a> đã xuất hiện đầu tiên vào ngày <a href="https://help.tenten.vn">Hướng dẫn TENTEN</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-size: 24px; font-weight: bold;">Mục lục</span></p>
<div class="container">
<div class="toc">
<ul>
<li><a href="#overview">1. Tổng quan</a></li>
<li><a href="#configuration">2. Cấu hình</a></li>
<li><a href="#endpoints">3. Các API Endpoints</a></li>
<li><a href="#reference-data">4. Dữ liệu tham chiếu</a></li>
<li><a href="#usage">5. Cách sử dụng</a></li>
<li><a href="#examples">6. Ví dụ code mẫu</a></li>
<li><a href="#important-notes">7. Lưu ý quan trọng</a></li>
<li><a href="#error-handling">8. Xử lý lỗi</a></li>
<li><a href="#security">9. Bảo mật</a></li>
</ul>
</div>
<section id="overview">
<h1>Tổng quan</h1>
<p>Dự án này cung cấp các API để tương tác với dịch vụ tên miền của TenTen, bao gồm tìm kiếm, đăng ký, quản lý và gia hạn tên miền. API được thiết kế để dễ dàng tích hợp vào các hệ thống quản lý tên miền hiện có.</p>
</section>
<section id="configuration">
<h1>Cấu hình</h1>
<h2>Thiết lập API Credentials</h2>
<p>Trong file <code>apitenten.php</code>, bạn cần cấu hình các thông tin sau:</p>
<div class="code-example">
<pre><code>&lt;?php
define("API_KEY", "api key lay tu trang cau hinh");
define("API_USER", "api user lay tu trang cau hinh");  
define("API_URL", "url ket noi api lay tu trang cau hinh");
?&gt;</code></pre>
</div>
<h2>Class API Core</h2>
<p>File <code>apitenten.php</code> chứa class <code>apiTenTen</code> với phương thức <code>callApi()</code> để thực hiện các cuộc gọi API thông qua cURL.</p>
</section>
<section id="endpoints">
<h1>Các API Endpoints</h1>
<div class="api-endpoint">
<h3>1. Tìm kiếm tên miền (search.php)</h3>
<div class="endpoint-info">
<div class="endpoint-detail"><strong>Mục đích:</strong> Kiểm tra tên miền đã được đăng ký hay chưa</div>
<div class="endpoint-detail"><strong>Endpoint:</strong> <code>search.json</code></div>
</div>
<h4>Parameters:</h4>
<table class="parameters-table">
<thead>
<tr>
<th>Tham số</th>
<th>Mô tả</th>
<th>Bắt buộc</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>api_key</code></td>
<td>Key truy cập API</td>
<td>&#x2705;</td>
</tr>
<tr>
<td><code>api_user</code></td>
<td>User truy cập API</td>
<td>&#x2705;</td>
</tr>
<tr>
<td><code>domainName</code></td>
<td>Tên miền cần kiểm tra</td>
<td>&#x2705;</td>
</tr>
</tbody>
</table>
<div class="code-example">
<pre><code>$cmd = "search.json";
$dataRequest["api_key"] = API_KEY;
$dataRequest["api_user"] = API_USER;
$dataRequest["domainName"] = "tenten.vn";</code></pre>
</div>
</div>
<div class="api-endpoint">
<h3>2. Tra cứu thông tin Whois (whois.php)</h3>
<div class="endpoint-info">
<div class="endpoint-detail"><strong>Mục đích:</strong> Lấy thông tin whois của tên miền đã được đăng ký</div>
<div class="endpoint-detail"><strong>Endpoint:</strong> <code>whois.json</code></div>
</div>
<h4>Parameters:</h4>
<table class="parameters-table">
<thead>
<tr>
<th>Tham số</th>
<th>Mô tả</th>
<th>Bắt buộc</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>api_key</code></td>
<td>Key truy cập API</td>
<td>&#x2705;</td>
</tr>
<tr>
<td><code>api_user</code></td>
<td>User truy cập API</td>
<td>&#x2705;</td>
</tr>
<tr>
<td><code>domainName</code></td>
<td>Tên miền cần xem thông tin whois</td>
<td>&#x2705;</td>
</tr>
</tbody>
</table>
<div class="code-example">
<pre><code>$cmd = "whois.json";
$dataRequest["api_key"] = API_KEY;
$dataRequest["api_user"] = API_USER;
$dataRequest["domainName"] = "tenten.com";</code></pre>
</div>
</div>
<div class="api-endpoint">
<h3>3. &#x1f1fb;&#x1f1f3; Đăng ký tên miền .vn (registerdomainvn.php)</h3>
<div class="endpoint-info">
<div class="endpoint-detail"><strong>Mục đích:</strong> Đăng ký tên miền .vn</div>
<div class="endpoint-detail"><strong>Endpoint:</strong> <code>create.json</code></div>
</div>
<h4>Parameters chính:</h4>
<table class="parameters-table">
<thead>
<tr>
<th>Tham số</th>
<th>Mô tả</th>
<th>Giá trị</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>domainType</code></td>
<td>Loại đăng ký</td>
<td>&#8220;I&#8221; = cá nhân, &#8220;R&#8221; = tổ chức</td>
</tr>
<tr>
<td><code>domainName</code></td>
<td>Tên miền cần đăng ký</td>
<td>example.vn</td>
</tr>
<tr>
<td><code>domainYear</code></td>
<td>Số năm đăng ký</td>
<td>1, 2, 3&#8230;</td>
</tr>
</tbody>
</table>
<h4>DNS Settings:</h4>
<ul>
<li><code>domainDNS1</code>, <code>domainIP1</code>: DNS Primary</li>
<li><code>domainDNS2</code>, <code>domainIP2</code>: DNS Secondary 1</li>
<li><code>domainDNS3</code>, <code>domainIP3</code>: DNS Secondary 2</li>
</ul>
<h4>Thông tin chủ sở hữu (Owner):</h4>
<table class="parameters-table">
<thead>
<tr>
<th>Tham số</th>
<th>Mô tả</th>
<th>Format</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ownerName</code></td>
<td>Tên người sử dụng</td>
<td>Nguyễn Văn A</td>
</tr>
<tr>
<td><code>ownerAddress</code></td>
<td>Địa chỉ</td>
<td>Số 1 Đào Duy Anh, Đống Đa</td>
</tr>
<tr>
<td><code>ownerBirthday</code></td>
<td>Ngày sinh</td>
<td>YYYY-MM-DD</td>
</tr>
<tr>
<td><code>ownerPersonID</code></td>
<td>Số CMND/CCCD</td>
<td>1111111111</td>
</tr>
<tr>
<td><code>ownerMail</code></td>
<td>Email</td>
<td>info@example.com</td>
</tr>
<tr>
<td><code>ownerPhone</code></td>
<td>Số điện thoại</td>
<td>+84-71089999</td>
</tr>
<tr>
<td><code>ownerCity</code></td>
<td>Mã tỉnh thành</td>
<td>HNI (Hà Nội)</td>
</tr>
<tr>
<td><code>ownerCountry</code></td>
<td>Mã quốc gia</td>
<td>VN (Việt Nam)</td>
</tr>
</tbody>
</table>
<div class="note-box">
<h4>Lưu ý:</h4>
<p>Thông tin người quản lý (Admin) có các trường tương tự như Owner nhưng với prefix <code>admin</code></p>
</div>
</div>
<div class="api-endpoint">
<h3>4. Đăng ký tên miền quốc tế (registerdomainqt.php)</h3>
<div class="endpoint-info">
<div class="endpoint-detail"><strong>Mục đích:</strong> Đăng ký tên miền quốc tế (.com, .net, .org, v.v.)</div>
<div class="endpoint-detail"><strong>Endpoint:</strong> <code>create.json</code></div>
</div>
<div class="note-box">
<h4>Lưu ý:</h4>
<p>Parameters tương tự như đăng ký .vn nhưng không yêu cầu thông tin admin</p>
</div>
</div>
<div class="api-endpoint">
<h3>5. Gia hạn tên miền (renew.php)</h3>
<div class="endpoint-info">
<div class="endpoint-detail"><strong>Mục đích:</strong> Gia hạn tên miền đã đăng ký</div>
<div class="endpoint-detail"><strong>Endpoint:</strong> <code>renew.json</code></div>
</div>
<h4>Parameters:</h4>
<table class="parameters-table">
<thead>
<tr>
<th>Tham số</th>
<th>Mô tả</th>
<th>Bắt buộc</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>api_key</code></td>
<td>Key truy cập API</td>
<td>&#x2705;</td>
</tr>
<tr>
<td><code>api_user</code></td>
<td>User truy cập API</td>
<td>&#x2705;</td>
</tr>
<tr>
<td><code>domainName</code></td>
<td>Tên miền cần gia hạn</td>
<td>&#x2705;</td>
</tr>
<tr>
<td><code>domainYear</code></td>
<td>Số năm cần gia hạn</td>
<td>&#x2705;</td>
</tr>
</tbody>
</table>
</div>
<div class="api-endpoint">
<h3>6. Thay đổi DNS (changednsdomain.php)</h3>
<div class="endpoint-info">
<div class="endpoint-detail"><strong>Mục đích:</strong> Thay đổi thông tin DNS của tên miền</div>
<div class="endpoint-detail"><strong>Endpoint:</strong> <code>nameserver.json</code></div>
</div>
<h4>Parameters:</h4>
<table class="parameters-table">
<thead>
<tr>
<th>Tham số</th>
<th>Mô tả</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>domainName</code></td>
<td>Tên miền cần thay đổi DNS</td>
</tr>
<tr>
<td><code>domainDNS1</code>, <code>domainIP1</code></td>
<td>DNS Primary mới</td>
</tr>
<tr>
<td><code>domainDNS2</code>, <code>domainIP2</code></td>
<td>DNS Secondary 1 mới</td>
</tr>
<tr>
<td><code>domainDNS3</code>, <code>domainIP3</code></td>
<td>DNS Secondary 2 mới</td>
</tr>
</tbody>
</table>
</div>
<div class="api-endpoint">
<h3>7. Lấy thông tin chi tiết tên miền (infodomain.php)</h3>
<div class="endpoint-info">
<div class="endpoint-detail"><strong>Mục đích:</strong> Lấy thông tin chi tiết của tên miền</div>
<div class="endpoint-detail"><strong>Endpoint:</strong> <code>info.json</code></div>
</div>
</div>
<div class="api-endpoint">
<h3>8. Danh sách tên miền (listdomain.php)</h3>
<div class="endpoint-info">
<div class="endpoint-detail"><strong>Mục đích:</strong> Lấy danh sách tên miền trong tài khoản</div>
<div class="endpoint-detail"><strong>Endpoint:</strong> <code>list.json</code></div>
</div>
</div>
</section>
<section id="reference-data">
<h1>Dữ liệu tham chiếu</h1>
<div class="reference-data">
<div class="reference-item">
<h4>Mã tỉnh thành Việt Nam</h4>
<p>File: <code>listProvinceVietnam.php</code></p>
<p><code>HNI: Hà Nội</code> <code>HCM: Hồ Chí Minh</code> <code>HPG: Hải Phòng</code> <code>DNK: Đà Nẵng</code></div>
<div class="reference-item">
<h4>Mã quốc gia</h4>
<p>File: <code>listCountry.php/listCountry.json</code></p>
<p><code>VN: Việt Nam</code> <code>US: United States</code> <code>GB: United Kingdom</code> <code>JP: Japan</code></div>
</div>
<h2>Dữ liệu địa danh hành chính</h2>
<p>Thư mục <code>dia_danh_hanh_chinh/</code> chứa các file dữ liệu về địa danh hành chính Việt Nam:</p>
<ul>
<li><code>location_provinces.csv/json</code>: Danh sách tỉnh thành</li>
<li><code>location_districts.csv/json</code>: Danh sách quận/huyện</li>
<li><code>location_wards.csv/json</code>: Danh sách phường/xã</li>
</ul>
</section>
<section id="usage">
<h1> Cách sử dụng</h1>
<ol>
<li><strong>Cấu hình API:</strong> Thiết lập <code>API_KEY</code>, <code>API_USER</code>, và <code>API_URL</code> trong file <code>apitenten.php</code></li>
<li><strong>Include file chính:</strong>
<div class="code-example">
<pre><code>require_once "apitenten.php";</code></pre>
</div>
</li>
<li><strong>Tạo request:</strong> Tạo mảng dữ liệu với các parameters cần thiết</li>
<li><strong>Gọi API:</strong> Sử dụng phương thức <code>$api-&gt;callApi($cmd, $request)</code></li>
<li><strong>Xử lý response:</strong> Parse JSON response và xử lý kết quả</li>
</ol>
</section>
<section id="examples">
<h1>Ví dụ code mẫu</h1>
<div class="success-box">
<h4>Ví dụ hoàn chỉnh &#8211; Kiểm tra tên miền</h4>
</div>
<div class="code-example">
<pre><code>&lt;?php
require_once "apitenten.php";

// Kiểm tra tên miền
$cmd = "search.json";
$dataRequest = array(
    "api_key" =&gt; API_KEY,
    "api_user" =&gt; API_USER,
    "domainName" =&gt; "example.vn"
);

$result = $api-&gt;callApi($cmd, $dataRequest);
$dataResult = json_decode($result, true);

if ($dataResult['status'] == 'success') {
    echo "Tên miền có thể đăng ký";
} else {
    echo "Tên miền đã được đăng ký";
}
?&gt;</code></pre>
</div>
</section>
<section id="important-notes">
<h1>Lưu ý quan trọng</h1>
<div class="warning-box">
<h4>Các điểm cần chú ý:</h4>
<ol>
<li><strong>Format số điện thoại:</strong> Phải theo định dạng quốc tế <code>+84-xxxxxxxx</code></li>
<li><strong>Format ngày sinh:</strong> Phải theo định dạng <code>YYYY-MM-DD</code></li>
<li><strong>Mã tỉnh thành và quốc gia:</strong> Phải sử dụng đúng mã trong các file tham chiếu</li>
<li><strong>DNS Settings:</strong> Cần cung cấp đầy đủ thông tin DNS khi đăng ký tên miền</li>
<li><strong>Domain Type:</strong> &#8220;I&#8221; cho cá nhân, &#8220;R&#8221; cho tổ chức</li>
</ol>
</div>
</section>
<section id="error-handling">
<h1>Xử lý lỗi</h1>
<p>Tất cả các API sẽ trả về response dạng JSON. Cần kiểm tra trường <code>status</code> để xác định kết quả thành công hay thất bại.</p>
<div class="code-example">
<pre><code>$dataResult = json_decode($result, true);

if ($dataResult['status'] == 'success') {
    // Xử lý khi thành công
    echo "Thao tác thành công: " . $dataResult['message'];
} else {
    // Xử lý khi có lỗi
    echo "Lỗi: " . $dataResult['error_message'];
}</code></pre>
</div>
</section>
<section id="security">
<h1>Bảo mật</h1>
<div class="warning-box">
<h4>Các nguyên tắc bảo mật:</h4>
<ul>
<li>Không chia sẻ <code>API_KEY</code> và <code>API_USER</code> công khai</li>
<li>Sử dụng HTTPS cho tất cả các cuộc gọi API</li>
<li>Validate dữ liệu đầu vào trước khi gửi request</li>
<li>Lưu trữ credentials trong file cấu hình riêng biệt</li>
<li>Sử dụng rate limiting để tránh spam API</li>
</ul>
</div>
</section>
<div class="footer">
<p>Link cấu hình chi tiết: https://id.tenten.vn/document_api/cauhinh.html</p>
<p>Danh mục API được cập nhập liên tục: https://id.tenten.vn/document_api/index.html</p>
</div>
</div>
<p>Bài viết <a href="https://help.tenten.vn/huong-dan-tich-hop-tenten-domain-api-quan-ly-ten-mien-tu-dong-2025/">Hướng dẫn tích hợp TenTen Domain API &#8211; Quản lý tên miền tự động 2025</a> đã xuất hiện đầu tiên vào ngày <a href="https://help.tenten.vn">Hướng dẫn TENTEN</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
