huong-dan-su-dung·25/11/2026·3 phút đọc
Bài viết

How to Get Your KiotViet Retailer Name, Client ID & Client Secret

Step-by-step guide to finding your Retailer name, verifying OTP, and generating Client ID & Client Secret in KiotViet Admin for two-way WMS sync.
How to Get Your KiotViet Retailer Name, Client ID & Client Secret

To enable two-way synchronization between KiotViet and WMS & EAM, you need three credentials: Retailer Name, Client ID, and Client Secret.

Follow this visual step-by-step guide using real KiotViet Admin screens to retrieve all three values in under 3 minutes.

How to Get Your KiotViet Retailer Name, Client ID & Client Secret - Giải pháp RFID Nhật Minh

1. Prerequisites Before Enabling KiotViet API

·         Admin Account: Sign in with the Store Owner / Admin account that has access to Store Settings.

·         API-Enabled Plan: Your KiotViet subscription must support Public API access (typically Professional or Higher plans).

·         Registered Contract Phone: The phone number on your KiotViet contract must be active to receive the SMS OTP verification code.

2. Step-by-Step Instructions in KiotViet Admin

Step 1: Open Settings → Store Settings → API Connection

Click the Settings gear icon in the top-right corner of KiotViet, select 'Thiết lập cửa hàng' (Store Settings), and choose 'Kết nối API' (API Connection) in the left sidebar. Click 'Chỉnh sửa' (Edit) to unlock API configuration.

How to Get Your KiotViet Retailer Name, Client ID & Client Secret - Giải pháp RFID Nhật Minh

Figure 6.1: KiotViet Settings → API Connection screen

Step 2: Verify Identity via Phone Number & SMS OTP

Enter the phone number registered on your KiotViet contract, click 'Nhận mã xác thực' (Get Verification Code), enter the 6-digit SMS OTP (valid for 5 minutes), and click 'Tiếp tục' (Continue).

How to Get Your KiotViet Retailer Name, Client ID & Client Secret - Giải pháp RFID Nhật Minh

Figure 6.2: Enter contract phone number for OTP verification

How to Get Your KiotViet Retailer Name, Client ID & Client Secret - Giải pháp RFID Nhật Minh

Figure 6.3: Enter the 6-digit SMS OTP code and click Tiếp tục

Step 3: Generate Client Secret, Enable Permissions & Copy Client ID

In the 'Điều khoản sử dụng' (Terms of Use) modal, enter a Connection Name (e.g., WMS RFID), set Status to 'Đang hoạt động' (Active), copy the 'Client ID', click 'Tạo mã' (Generate Code) for 'Mã bảo mật' (Client Secret), check 'Cho phép truy xuất thông tin khách hàng, hoá đơn, đặt hàng từ gian hàng của bạn' (Allow third-party access to customers, invoices, and orders), and click 'Lưu' (Save).

How to Get Your KiotViet Retailer Name, Client ID & Client Secret - Giải pháp RFID Nhật Minh

Figure 6.4: Copy Client ID, generate Client Secret, and enable data access permissions

Step 4: Find Your Retailer Name

Your Retailer Name is the subdomain before '.kiotviet.vn' in your browser address bar (e.g., for 'https://thoitrangabc.kiotviet.vn/man/', the Retailer Name is 'thoitrangabc').

3. Enter KiotViet Credentials into WMS & EAM

In WMS & EAM, go to 'Cấu hình' → 'Tích hợp bán hàng', select 'KiotViet', paste your Retailer Name, Client ID, and Client Secret, click 'Kiểm tra kết nối' (Test Connection), select your KiotViet Branch, click 'Lưu cấu hình', and click 'Đồng bộ ngay'.

How to Get Your KiotViet Retailer Name, Client ID & Client Secret - Giải pháp RFID Nhật Minh

Figure 6.5: Entering KiotViet credentials into WMS & EAM

Regenerating Client Secret Invalidates the Old One: If you click 'Tạo mã' again in KiotViet later, the previous Client Secret stops working immediately. Always update the new secret in WMS & EAM.

 

4. Troubleshooting KiotViet API Connection

Why do I get a 401 Unauthorized error when testing the connection?

Ensure 'Tên gian hàng' contains only the subdomain without '.kiotviet.vn' or trailing spaces, and verify Client ID and Client Secret.

Products sync, but customers and invoices are missing?

You likely missed checking the 'Cho phép truy xuất thông tin khách hàng, hoá đơn, đặt hàng...' checkbox in Step 3. Re-open API Connection, check it, and click Save.