# Lấy user agent của trình duyệt

Sinh một user agent khớp với hệ điều hành và nhà sản xuất trình duyệt được yêu cầu.
- **Điều kiện tiên quyết**
: Firefox chỉ hợp lệ với Windows hoặc macOS, và
`osVersion`
 phải là một trong các bản phát hành được hỗ trợ.
- **Tác động**
: không có, nhưng
**kết quả không xác định trước được**
 — cùng một yêu cầu sẽ trả về một user agent khác mỗi lần. Đừng dùng nó làm khóa cache.
- **Hoàn tất**
: đồng bộ. Thử lại an toàn.
- **Open API**
: chỉ các kernel đã phát hành được dùng để dựng user agent; không đọc thông tin nào của client.

Endpoint: POST /env/advanced/ua/get
Version: 2026-09-05
Security: OpenApiBearer

## Security:

  - `OpenApiBearer` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `os` (integer, required)
    Hệ điều hành:
- `1`
 — Windows
- `2`
 — macOS
- `3`
 — Android
- `4`
 — iOS
- `5`
 — Linux
    Enum: "1", "2", "3", "4", "5"

  - `osVersion` (string)
    Phiên bản hệ điều hành. Mặc định là chuỗi rỗng.
    Enum: "", "Windows 7", "Windows 8", "Windows 10", "Windows 11", "macOS 12", "macOS 13", "macOS 14"

  - `vendor` (integer, required)
    Loại trình duyệt:
- `1`
 — Chrome
- `2`
 — Firefox
    Enum: "1", "2"

  - `mobileDevice` (string)
    ID mẫu thiết bị di động. Dùng cho profile Android và iOS.
    Example: pixel_8

  - `systemBitType` (integer)
    Số bit của hệ thống. Mặc định `1`:
- `0`
 — 32 bit
- `1`
 — 64 bit
    Enum: "0", "1"

  - `architecture` (integer)
    Kiến trúc CPU. Mặc định `0`:
- `0`
 — x86
- `1`
 — ARM
    Enum: "0", "1"

## Response 200:

  - `200` (unknown)
    Thành công

## Response 200 fields (application/json):

  - `code` (integer, required)
    Return result code. `0` means success; other codes indicate exceptions.
    Example: 0

  - `msg` (string | null, required)
    Error message. Usually `null` on success.
    Example: null

  - `requestId` (string)
    Operation request ID. This field may be present when the request passes through the API gateway.
    Example: 1d4f3ea968664593860b94b35d4ebf5e

  - `data` (object, required)

  - `data.ua` (string)
    User agent đã khớp.
    Example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36

  - `data.resolution` (object)

  - `data.resolution.id` (string)
    ID độ phân giải.
    Example: 1920_1080

  - `data.resolution.value` (string)
    Giá trị hiển thị.
    Example: 1920x1080

  - `data.mobileDevice` (string | null)
    ID mẫu thiết bị di động. Để trống với profile máy tính.
    Example: null

