2. Tạo Profile

Tạo profile

POST http://127.0.0.1:12368/profiles

Parameters - Parameter

NameTypeDescription

os

String

Hệ điều hành. Danh sách các hệ điều hành hỗ trợ: (win, mac, lin, android, ios)

name

String

Optional Tên profile

notes

String

Optional Chú thích

browser

String

Optional Trình duyệt. Danh sách trình duyệt hỗ trợ: (chrome, opera, edge, firefox)

proxy

String

Optional Proxy. Sử dụng theo định dạng sau: "{"host":"103.171.112.245","mode":"http","password":"1ee93edba5c911c33","port":19099,"username":"nguyenmanhtien.bh"}"

Examples

  • Curl example

curl -X POST http://127.0.0.1:12368/profiles -i -d "os=mac&name=test&notes=example&browser=chrome"
  • Javascript example

const hidemyacc = new Hidemyacc();
const proxy = {
  host: "103.171.112.245",
  mode: "http",
  password: "1ee93edba5c911c33",
  port: 19099,
  username: "nguyenmanhtien.bh",
};
const user = await hidemyacc.create(os, name, notes, browser, proxy);

Success response

Success response - Success 200

NameTypeDescription

data

Object

Thông tin profile được tạo.

Success response example

Success response example - Success-Example

HTTP/1.1 200 OK
    {
        "code": 1,
        "data":
        {
            "browserType": "chrome",
            "createdAt": "2021-10-06T09:28:43.178Z",
            "id": "615d6c4b2a151505fe6ba060",
            "name": "test",
            "notes": "example",
            "os": "mac",
            "platform": "MacIntel",
            "proxy":
            {
                "autoProxyPassword": "",
                "autoProxyRegion": "us",
                "autoProxyServer": "",
                "autoProxyUsername": "",
                "host": "",
                "mode": "none",
                "password": "",
                "port": 80,
                "proxyEnabled": false,
                "torProxyRegion": "us",
                "username": ""
            },
            "role": "owner",
            "updatedAt": "2021-10-06T09:28:43.178Z"
        }
    }

Error response

Error response - Error 4xx

NameTypeDescription

401

Chưa đăng nhập vào tài khoản

Error response example

Error response example - Response (example):

HTTP/1.1 401 Not Authenticated
{
  "code": 0,
  "message": "Unauthorized",
  "data": {}
}

Last updated