• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
buonhayvui1404

buonhayvui1404

account-manager

Profile & proxy manager for account nurturing using Kernel.sh
Public
Like
account-manager
Home
Code
12
API-REFERENCE.md
DEPLOYMENT-GUIDE.md
INDEX.md
QUICK-START.md
README.md
START-HERE.md
SUMMARY.md
api-config.ts
kernel-integration.ts
H
main.ts
test-ui.html
ui.html
Environment variables
1
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
API-REFERENCE.md
Code
/
API-REFERENCE.md
Search
…
API-REFERENCE.md

API Reference - Account Manager\n\nTài liệu tham khảo đầy đủ cho tất cả các endpoint API của ứng dụng.\n\n## Base URL\n\n\nhttps://valtown.val.run/buonhayvui1404/account-manager\n\n\n## Authentication\n\nTất cả các request đến Kernel API đều được xử lý server-side. Client không cần gửi API key.\n\n## Endpoints\n\n### 1. Profiles API\n\n#### GET /api/profiles\nLấy danh sách tất cả profile đã tạo.\n\nRequest:\nbash\ncurl -X GET \"https://valtown.val.run/buonhayvui1404/account-manager/api/profiles\"\n\n\nResponse (200 OK):\njson\n[\n {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"my_account_1\",\n \"kernelId\": \"kernel_profile_id_123\",\n \"proxyId\": \"456e7890-a12b-34d5-e678-901234567890\",\n \"status\": \"active\",\n \"createdAt\": \"2026-03-14T09:36:20.000Z\"\n },\n {\n \"id\": \"223e4567-e89b-12d3-a456-426614174001\",\n \"name\": \"my_account_2\",\n \"kernelId\": \"kernel_profile_id_456\",\n \"proxyId\": null,\n \"status\": \"active\",\n \"createdAt\": \"2026-03-14T10:00:00.000Z\"\n }\n]\n\n\n---\n\n#### POST /api/profiles\nTạo profile mới.\n\nRequest Body:\njson\n{\n \"name\": \"my_account_1\",\n \"proxyId\": \"456e7890-a12b-34d5-e678-901234567890\"\n}\n\n\nParameters:\n- name (string, required): Tên profile duy nhất\n- proxyId (string, optional): ID của proxy để gán cho profile\n\nExample:\nbash\ncurl -X POST \"https://valtown.val.run/buonhayvui1404/account-manager/api/profiles\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"my_account_1\",\n \"proxyId\": \"456e7890-a12b-34d5-e678-901234567890\"\n }'\n\n\nResponse (201 Created):\njson\n{\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"my_account_1\",\n \"kernelId\": \"kernel_profile_id_123\",\n \"proxyId\": \"456e7890-a12b-34d5-e678-901234567890\"\n}\n\n\nError Response (400 Bad Request):\njson\n{\n \"error\": \"Profile name is required\"\n}\n\n\nError Response (500 Internal Server Error):\njson\n{\n \"error\": \"Kernel API error: Unauthorized\"\n}\n\n\n---\n\n#### DELETE /api/profiles/:id\nXóa profile theo ID.\n\nParameters:\n- id (string, required): ID của profile cần xóa\n\nExample:\nbash\ncurl -X DELETE \"https://valtown.val.run/buonhayvui1404/account-manager/api/profiles/123e4567-e89b-12d3-a456-426614174000\"\n\n\nResponse (200 OK):\njson\n{\n \"success\": true\n}\n\n\nError Response (404 Not Found):\njson\n{\n \"error\": \"Profile not found\"\n}\n\n\n---\n\n#### GET /api/profiles/:id/live-view\nLấy URL live view của profile để monitor.\n\nParameters:\n- id (string, required): ID của profile\n\nExample:\nbash\ncurl -X GET \"https://valtown.val.run/buonhayvui1404/account-manager/api/profiles/123e4567-e89b-12d3-a456-426614174000/live-view\"\n\n\nResponse (200 OK):\njson\n{\n \"url\": \"https://live.kernel.sh/view/123e4567-e89b-12d3-a456-426614174000\",\n \"expiresAt\": \"2026-03-14T10:36:20.000Z\"\n}\n\n\nError Response (404 Not Found):\njson\n{\n \"error\": \"Profile not found\"\n}\n\n\n---\n\n### 2. Proxies API\n\n#### GET /api/proxies\nLấy danh sách tất cả proxy đã tạo.\n\nRequest:\nbash\ncurl -X GET \"https://valtown.val.run/buonhayvui1404/account-manager/api/proxies\"\n\n\nResponse (200 OK):\njson\n[\n {\n \"id\": \"456e7890-a12b-34d5-e678-901234567890\",\n \"name\": \"Proxy US1\",\n \"kernelId\": \"kernel_proxy_id_123\",\n \"host\": \"123.45.67.89\",\n \"port\": 8080,\n \"username\": \"user123\",\n \"createdAt\": \"2026-03-14T09:30:00.000Z\"\n },\n {\n \"id\": \"556e7890-a12b-34d5-e678-901234567891\",\n \"name\": \"Proxy US2\",\n \"kernelId\": \"kernel_proxy_id_456\",\n \"host\": \"98.76.54.32\",\n \"port\": 3128,\n \"username\": null,\n \"createdAt\": \"2026-03-14T10:00:00.000Z\"\n }\n]\n\n\n---\n\n#### POST /api/proxies\nTạo proxy cố định mới.\n\nRequest Body:\njson\n{\n \"name\": \"Proxy US1\",\n \"host\": \"123.45.67.89\",\n \"port\": 8080,\n \"username\": \"user123\",\n \"password\": \"pass123\"\n}\n\n\nParameters:\n- name (string, required): Tên proxy duy nhất\n- host (string, required): Địa chỉ IP hoặc domain của proxy\n- port (number, required): Cổng proxy\n- username (string, optional): Tên đăng nhập nếu proxy yêu cầu auth\n- password (string, optional): Mật khẩu nếu proxy yêu cầu auth\n\nExample:\nbash\ncurl -X POST \"https://valtown.val.run/buonhayvui1404/account-manager/api/proxies\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Proxy US1\",\n \"host\": \"123.45.67.89\",\n \"port\": 8080,\n \"username\": \"user123\",\n \"password\": \"pass123\"\n }'\n\n\nResponse (201 Created):\njson\n{\n \"id\": \"456e7890-a12b-34d5-e678-901234567890\",\n \"name\": \"Proxy US1\",\n \"kernelId\": \"kernel_proxy_id_123\",\n \"host\": \"123.45.67.89\",\n \"port\": 8080\n}\n\n\nError Response (400 Bad Request):\njson\n{\n \"error\": \"Name, host, and port are required\"\n}\n\n\n---\n\n#### DELETE /api/proxies/:id\nXóa proxy theo ID.\n\nParameters:\n- id (string, required): ID của proxy cần xóa\n\nExample:\nbash\ncurl -X DELETE \"https://valtown.val.run/buonhayvui1404/account-manager/api/proxies/456e7890-a12b-34d5-e678-901234567890\"\n\n\nResponse (200 OK):\njson\n{\n \"success\": true\n}\n\n\nError Response (404 Not Found):\njson\n{\n \"error\": \"Proxy not found\"\n}\n\n\n---\n\n## Status Codes\n\n| Code | Meaning |\n|------|----------|\n| 200 | OK - Yêu cầu thành công |\n| 201 | Created - Tài nguyên được tạo thành công |\n| 400 | Bad Request - Dữ liệu không hợp lệ |\n| 404 | Not Found - Không tìm thấy tài nguyên |\n| 500 | Internal Server Error - Lỗi server |\n\n## Rate Limiting\n\nKhông có rate limiting được áp dụng trên client side. Tuy nhiên, Kernel API có thể có giới hạn riêng.\n\n## Error Handling\n\nTất cả các error đều trả về JSON format:\n\njson\n{\n \"error\": \"Error message here\"\n}\n\n\n## Examples\n\n### 1. Tạo proxy và profile liên kết\n\nbash\n# Tạo proxy\nPROXY=$(curl -s -X POST \"https://valtown.val.run/buonhayvui1404/account-manager/api/proxies\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"My Proxy\",\n \"host\": \"proxy.example.com\",\n \"port\": 8080\n }' | jq -r '.id')\n\n# Tạo profile với proxy\ncurl -X POST \"https://valtown.val.run/buonhayvui1404/account-manager/api/profiles\" \\\n -H \"Content-Type: application/json\" \\\n -d \"{\n \\\"name\\\": \\\"My Account\\\",\n \\\"proxyId\\\": \\\"$PROXY\\\"\n }\"\n\n\n### 2. Xem live view của profile\n\nbash\nPROFILE_ID=\"123e4567-e89b-12d3-a456-426614174000\"\nLIVE_VIEW_URL=$(curl -s -X GET \"https://valtown.val.run/buonhayvui1404/account-manager/api/profiles/$PROFILE_ID/live-view\" | jq -r '.url')\necho \"Open in browser: $LIVE_VIEW_URL\"\n\n\n### 3. Liệt kê tất cả profile\n\nbash\ncurl -X GET \"https://valtown.val.run/buonhayvui1404/account-manager/api/profiles\" | jq '.'\n\n\n## Data Models\n\n### Profile Object\n\ntypescript\ninterface Profile {\n id: string; // UUID duy nhất\n name: string; // Tên profile (duy nhất)\n kernelId: string; // ID từ Kernel API\n proxyId: string | null; // ID proxy được gán (nếu có)\n status: string; // 'active' hoặc 'inactive'\n createdAt: string; // ISO 8601 timestamp\n}\n\n\n### Proxy Object\n\ntypescript\ninterface Proxy {\n id: string; // UUID duy nhất\n name: string; // Tên proxy (duy nhất)\n kernelId: string; // ID từ Kernel API\n host: string; // Địa chỉ proxy\n port: number; // Cổng proxy\n username: string | null; // Tên đăng nhập (nếu có)\n createdAt: string; // ISO 8601 timestamp\n}\n\n\n---\n\n## Notes\n\n- Tất cả ID là UUID v4\n- Tất cả timestamps là ISO 8601 format\n- Password của proxy không được trả về trong response (bảo mật)\n- Kernel API keys được lưu trữ an toàn server-side\n- Database được lưu trữ local trong Val Town\n\n---\n\nCần trợ giúp? Kiểm tra README.md hoặc Kernel docs tại https://kernel.sh/docs/api-reference/\n

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.