{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/vi/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Bắt đầu nhanh","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"bắt-đầu-nhanh","__idx":0},"children":["Bắt đầu nhanh"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Việc bắt đầu nhanh này giả định rằng bạn đã cài đặt ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli"]}," (xem ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/vi/cli#download--installation"},"children":["Tải xuống và cài đặt"]},") và ứng dụng khách MoreLogin đang chạy cục bộ."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-kiểm-tra-dịch-vụ","__idx":1},"children":["1. Kiểm tra dịch vụ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Xác nhận rằng ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["httpServer"]}," cục bộ có thể truy cập được:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli status\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nếu MoreLogin không chạy, CLI sẽ không thành công trong quá trình phân giải cổng."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-xác-thực","__idx":2},"children":["2. Xác thực"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nếu điểm cuối yêu cầu xác thực, hãy đăng nhập trước:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli login --api-id your-api-id --api-key your-api-key\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Bạn cũng có thể cung cấp mã thông báo thông qua biến môi trường:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"export ML_API_KEY=your-token\nml-cli env list\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-liệt-kê-hồ-sơ-trình-duyệt","__idx":3},"children":["3. Liệt kê hồ sơ trình duyệt"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Liệt kê các môi trường trình duyệt:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env list\nml-cli env list --page-no 1 --page-size 20\nml-cli env list --env-name test\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"4-bắt-đầu-hồ-sơ-trình-duyệt","__idx":4},"children":["4. Bắt đầu hồ sơ trình duyệt"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Bạn có thể bắt đầu một môi trường bằng ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["envId"]}," hoặc ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uniqueId/sn"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env start --id 1001\nml-cli env start --env-id 1868548141708648448\nml-cli env start --unique-id SN001\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"5-tạo-và-chỉ-định-proxy","__idx":5},"children":["5. Tạo và chỉ định proxy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tạo proxy trước:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli proxy create \\\n  --proxy-name local-http \\\n  --proxy-ip 127.0.0.1 \\\n  --proxy-port 7890 \\\n  --proxy-type 0 \\\n  --proxy-provider 0\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sau đó gán nó vào một môi trường:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env set-proxy \\\n  --env-ids 1001 \\\n  --proxy-ip 127.0.0.1 \\\n  --proxy-port 7890 \\\n  --proxy-type 0 \\\n  --proxy-provider 0 \\\n  --proxy-name local-http\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"6-làm-việc-với-điện-thoại-đám-mây","__idx":6},"children":["6. Làm việc với điện thoại đám mây"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Liệt kê điện thoại đám mây:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloudphone list\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tạo điện thoại đám mây:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloudphone create --sku-id 10004 --quantity 1\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tìm nạp chi tiết:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloudphone info --id 123456\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"7-lịch-truy-vấn","__idx":7},"children":["7. Lịch truy vấn"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Liệt kê các mẫu lịch trình và nhiệm vụ:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli schedule template-market --page-no 1 --page-size 20\nml-cli schedule list --page-no 1 --page-size 20\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tạo tác vụ một lần:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli schedule create-once-task \\\n  --cloud-phone-id 123456 \\\n  --schedule-name once-task-demo \\\n  --template-id 888 \\\n  --template-parameter '{}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"8-sử-dụng---json-data","__idx":8},"children":["8. Sử dụng ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json-data"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Đối với các điểm cuối có nhiều trường, việc truyền JSON thô thường nhanh hơn:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env create-advanced \\\n  --json-data '{\"browserTypeId\":1,\"operatorSystemId\":1,\"envName\":\"cli-adv-test\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cờ CLI và ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json-data"]}," có thể được kết hợp. Cờ rõ ràng ghi đè các khóa khớp từ tải trọng JSON:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env set-proxy \\\n  --env-ids 1001 \\\n  --json-data '{\"proxy\":{\"proxyProvider\":\"0\",\"proxyIp\":\"1.1.1.1\"}}' \\\n  --proxy-ip 127.0.0.1\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"9-chuyển-tới-jq","__idx":9},"children":["9. Chuyển tới ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jq"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLI in JSON thô, hoạt động tốt với các đường dẫn shell:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli status | jq '.status'\nml-cli env processes | jq '.data[].pid'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"10-các-trường-hợp-hư-hỏng-thường-gặp","__idx":10},"children":["10. Các trường hợp hư hỏng thường gặp"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Could not detect MoreLogin port"]},": MoreLogin không chạy, IPC không khả dụng hoặc không cung cấp ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--port"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["lỗi kinh doanh với mã thoát ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},": yêu cầu HTTP đã thành công nhưng phản hồi JSON chứa lỗi cấp ứng dụng"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli env arrange"]}," trên Linux: triển khai hiện tại không hỗ trợ và thoát ngay lập tức"]}]}]},"headings":[{"value":"Bắt đầu nhanh","id":"bắt-đầu-nhanh","depth":1},{"value":"1. Kiểm tra dịch vụ","id":"1-kiểm-tra-dịch-vụ","depth":2},{"value":"2. Xác thực","id":"2-xác-thực","depth":2},{"value":"3. Liệt kê hồ sơ trình duyệt","id":"3-liệt-kê-hồ-sơ-trình-duyệt","depth":2},{"value":"4. Bắt đầu hồ sơ trình duyệt","id":"4-bắt-đầu-hồ-sơ-trình-duyệt","depth":2},{"value":"5. Tạo và chỉ định proxy","id":"5-tạo-và-chỉ-định-proxy","depth":2},{"value":"6. Làm việc với điện thoại đám mây","id":"6-làm-việc-với-điện-thoại-đám-mây","depth":2},{"value":"7. Lịch truy vấn","id":"7-lịch-truy-vấn","depth":2},{"value":"8. Sử dụng --json-data","id":"8-sử-dụng---json-data","depth":2},{"value":"9. Chuyển tới jq","id":"9-chuyển-tới-jq","depth":2},{"value":"10. Các trường hợp hư hỏng thường gặp","id":"10-các-trường-hợp-hư-hỏng-thường-gặp","depth":2}],"frontmatter":{"seo":{"title":"Bắt đầu nhanh"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/vi/cli/quick-start","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}