Управление профилем браузера

Updated by MoreLogin

1.1 Startup the browser profile

Запустить профиль браузера

Базовая информация

POST  /профиль/пуск/браузер

Описание интерфейса: Для запуска необходимо указать идентификатор профиля браузера. После успешного запуска профиля браузера вы можете получить интерфейс отладки профиля для автоматизации Selenium и Puppeteer. Selenium необходимо использовать Webdriver, соответствующий соответствующей версии ядра. После запуска профиля браузера вы можете получить путь к соответствующему веб-драйверу из ответа (в настоящее время поддерживается только режим веб-драйвера Google Chrome).Поддерживаются только версии системы между 1.9.7.18 и 1.9.20.18 (в настоящее время поддерживается только на компьютерах с Windows).

Параметры запроса

Параметры заголовка

Parameter name

Type

Required

Default value

Sample

Desc_

x-api-key

string

Yes

-

-

Each MoreLogin user has their own special API-key, you can see in the system api page

Body Parameters, Optional Parameters can be omitted.

Parameter name

Type

Required

Default value

Sample

Desc_

id

string

Yes

-

1685585192182

browser profile ID

Возврат данных

{
"ret": 0,
"data": {
"webdriver_url": "http://localhost:12345", //webdriver path
"port": "12345" //browser debugging interface for automation tool connection
"core_type": 0,
"version": 112
}
}
"error": {
"failure_code": 1, //error codes
"biz_code": 10010,
"client_code": 0, //Network Status: 1: Network Error -1: Program Exception
}
}

Коды ошибок

failure_code

Desc_

1

Failed to initialize data

2

Detected that the current IP cannot be used properly. Please contact customer service

3

Detected that a VPN is enabled locally, preventing browser profile startup.

4

Failed to initialize time zone

5

Failed to initialize proxy

6

Initialized black and white lists

7

Failed to start the kernel

8

Initialized browser profile directory

9

Failed to initialize cookies

10

Failed to initialize bookmarks

11

Failed to initialize browser profile

12

Failed to initialize local IP information

13

Initialized runtime configuration

14

Initialized canvas fingerprint information

15

Obtained browser profile permission settings

16

Obtained whether the browser profile is allowed to be opened

17

No corresponding kernel/ kernel version unavailable, opening 

18

Proxy detection failed

-2

Unknown exception

-1

No network connection

-10006

The browser profile is already open, no need to start again

40053

Your team member is currently using the current browser profile, so it cannot be started.

Tips:Your super administrator has enabled the Security Lock. The same browser profile cannot be started simultaneously on multiple computers.

bizcode

Desc_

40002

Proxy has expired, launch failed

40001

Proxy has been deleted, launch failed

40039

Proxy status is unassigned, launch failed

10001

Incorrect browser profile ID format, launch failed

10000

Browser profile does not exist, cannot start

1003

Proxy software request failed, please check if the software is running normally

103

Browser profile has been deleted, cannot start

102

No current browser profile permissions, launch failed

-1

Package has expired, launch failed

1.2 Определить статус профиля браузера

Базовая информация

POST  /профиль/проверка/браузер

Описание интерфейса: После запуска профиля браузера рекомендуем выполнить определение прокси среды. Если вы пропустите этот шаг, вы не сможете определить сетевое окружение внутри текущего профиля браузера, что может привести к тому, что проблемы с сетью не будут работать должным образом. Поддерживаются только версии системы между 1.9.7.18 и 1.9.20.18 (в настоящее время поддерживается только на компьютерах с Windows).

Параметры запроса

Параметры заголовка

Parameter name

Type

Required

Default value

Sample

Desc_

x-api-key

string

Yes

-

-

Each MoreLogin user has their own special API-key, you can see in the system api page

Параметры тела, дополнительные параметры можно опустить.

Parameter name

Type

Required

Default value

Sample

Desc_

id

string

Yes

-

1685585192182

browser profile ID

Возврат данных

Detection Successful
{
"ret": 0,
"data": {
"status": 0,
"ip": {
"ip": "111.111.111.111",
"status": 0,
"msg": "Successful"
}
}
}
Detection Failed
{
"ret": 1,
"data": {
"status": 2,
"ip": {
"ip": "Connection failure",
"status": 2,
"msg": "string"
}
}

1.3 Остановить профиль браузера

Базовая информация

POST  /профиль/стоп/браузер

Описание интерфейса: Чтобы закрыть определенный профиль браузера, необходимо указать идентификатор профиля браузера. Поддерживаются только версии системы между 1.9.7.18 и 1.9.20.18 (в настоящее время поддерживается только на компьютерах с Windows).

Параметры запроса

Параметры заголовка

Parameter name

Type

Required

Default value

Sample

Desc_

x-api-key

string

Yes

-

-

Each MoreLogin user has their own special API-key, you can see in the system api page

Параметры тела, дополнительные параметры можно опустить.

Parameter name

Type

Required

Default value

Sample

Desc_

id

string

Yes

-

1685585192182

browser profile ID

Возврат данных

Successful
{
"ret": 0
}
Failed
{
"ret": 404,
"error": 0,
"msg": "string"
}

1.4 Быстрое создание профиля браузера

Базовая информация

POST  /профиль/quick_add

Описание интерфейса: Быстрое создание профиля браузера позволяет быстро создавать профили браузера. Он поддерживает настройку имени среды, браузера, операционной системы и количества создаваемых сред. После успешного создания API вернет идентификатор среды. Поддерживаются только версии системы между 1.9.7.18 и 1.9.20.18 (в настоящее время поддерживается только на компьютерах с Windows).

Параметры запроса

Параметры заголовка

Parameter name

Type

Required

Default value

Sample

Desc_

x-api-key

string

Yes

-

-

Each MoreLogin user has their own special API-key, you can see in the system api page

Параметры тела, дополнительные параметры можно опустить. Формат параметра — JSON.

Parameter name

Type

Required

Default value

Sample

Desc_

names

array[string]

N

-

P-1

Browser profile name(Maximum 64 characters)

default_browser

integer

Y

-

0

Default browser

0:chrome 1:firefox

system_type

integer

Y

-

1

System type

(select the system type that matches your current device)

1:windows 2:ios 3:android 4:macos

count

integer

Y

-

1

 Create amount(Maximum of 50 browser profile can be created at one time)

group_id

integer

N

-

1

Browser profile group ID (This field is required if you don't have "All Browser Profiles" permission.)

Возврат данных

{
"ret": 0, //error code
"status": "0",
"msg": "string", //error information
"data": {
"ids": [
0 //browser profiles ID list
]
}
}

1.5 Расширенное создание профиля браузера

Базовая информация

POST  /профиль/add

Описание интерфейса: Расширенное создание профиля браузера позволяет настроить учетные данные учетной записи платформы, файлы cookie, информацию об отпечатках пальцев и многое другое для среды. После успешного создания он возвращает идентификатор среды. Поддерживаются только версии системы между 1.9.7.18 и 1.9.20.18 (в настоящее время поддерживается только на компьютерах с Windows).

Параметры запроса

Параметры заголовка

Parameter name

Type

Required

Default value

Sample

Desc_

x-api-key

string

Yes

-

-

Each MoreLogin user has their own special API-key, you can see in the system api page

Параметры тела, дополнительные параметры можно опустить. Формат параметра — JSON.

Parameter name

Type

Required

Default value

Sample

Desc_

base_info

object {6}

Yes

-

-

Basic Information

account_info

object {6}

No

-

-

Account Information

advanced_setting

object {19}

No

-

-

Advanced Settings

base_info

Parameter name

Type

Required

Default value

Sample

Desc_

name

string

No

-

P-1

Browser Profile Name (up to 64 characters)

default_browser

integer

Yes

-

0

Default Browser

0:chrome 1:firefox

When default_browser is equal to 0, system_type can be 1 to 4

When default_browser is equal to 1, system_type can be 1

kernel_version

string

No

-

-

Browser Kernel Version

Use the "1.9, Get List of Browser Kernel Versions" API to get the list of currently available kernel versions.

When the default_browser parameter is set to 2, changing the kernel version is not supported.

system_type

integer

Yes

-

1

System Type

(It is recommended to select the system type that matches your current device)

1:windows 2:ios 3:android 4:macos

group_id

integer

No

-

-

Browser Profile Group ID

proxy_id

integer

No

-

-

Proxy ID bound to the browser profile

account_info

Parameter name

Type

Required

Default value

Sample

Desc_

username

string

No

-

-

Platform account login name

password

string

No

-

-

Platform account login password

cookie

string

No

-

-

Supports JSON formatted cookies

platform_name

string

No

-

Amazon United States

Platform name, please refer to the attached document for details

custom_platform_url

string

No

-

-

Custom Platform URL

When platform_name is set to "Customised platforms," custom_platform_url is required

after_startup_config

object {2}

No

-

-

Configuration After Browser Profile Startup

after_startup_config

Parameter name

Type

Required

Default value

Sample

Desc_

after_startup

integer

No

3

1

Actions after startup:

1: Open last visited webpage 2: Open specified webpage 3: Open specified webpage and platform webpage

auto_open_urls

array[string]

No

-

-

Specified Webpage URLs, up to 10 URLs

расширенная_настройка

Parameter name

Type

Required

Default value

Sample

Desc_

ua

string

No

-

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.46 Safari/537.36

User-Agent information:

By default, not passing this parameter will use a random User-Agent from the library. If you want to customize it, make sure the User-Agent format and content are in accordance with the standards.

timezone

string

No

-

-

Timezone, not passing this parameter indicates matching the IP timezone.

Available timezones can be found in the attachment.

web_rtc

integer

No

3

-

WebRTC

1: Disabled 2: Privacy Mode 3: Replace 4: Real

geolocation

object {5} 

No

-

-

Location Information

When the type is not equal to 3 and location_follow_ip is set to false, longitude and latitude are required.

language_list

array[string]

No

-

-

Language

Supported languages are detailed in the attachment.

resolution

integer

No

-

1024*768

MoreLogin supports Mac/Windows/Android/iOS.

Please make sure that the system_type corresponds to the resolution of the device to ensure that the parameters are true.

Please refer to the corresponding mapping: https://docs.morelogin.com/l/en/appendix/resolution

font_list

array[string]

No

-

-

Font, supported fonts are detailed in the attachment.

When system_type is set to 3, customization is not possible and the entry will be invalid.

canvas

integer

No

1

1

Canvas:

1: Noise 2: Real

web_gl

object {2}

No

-

-

WebGL

audio_context

integer

No

1

1

AudioContext:

1: Noise 2: Real

media_device

integer

No

1

1

Media Device:

1: Noise 2: Real

client_rects

integer

No

1

1

ClientRects:

1: Noise 2: Real

speech_voices

integer

No

1

1

SpeechVoices:

1: Noise 2: Real

concurrent_hardware_num

integer

No

4

0

Hardware Concurrency:

0 (Real Concurrency), 2, 3, 4, 6, 8, 10, 12

device_memory

integer

No

8

0

Device Memory:

0 (Real Memory), 2, 4, 6, 8

do_not_track

integer

No

2

1

Do Not Track:

1: Enable 2: Disable

bluetooth

integer

No

1

1

Bluetooth:

1: Privacy 2: Real

battery

integer

No

1

1

Battery:

1: Privacy 2: Real

port_scan_protection

object {2}

No

-

-

Port Scanning Protection

geolocation

Parameter name

Type

Required

Default value

Sample

Desc_

type

integer

No

1

1

Geolocation Type

1: Ask 2: Allow 3: Disable

When type is not 3 and location_follow_ip is false, longitude and latitude are required.

location_follow_ip

boolean

No

true

-

Whether to generate corresponding geolocation based on IP

Yes: true No: false

longitude

string

No

-

-

Longitude

lattitude

string

No

-

-

Latitude

accuracy

string

No

-

-

Precision (meters)

port_scan_protection

Parameter name

Type

Required

Default value

Sample

Desc_

type

integer

No

1

1

WebGL

1: Noise 2: Real

metadata

integer

No

3

1

WebGL Metadata Type:

1: Disable Hardware Acceleration 2: Real 3: Custom

after_startup_config

Parameter name

Type

Required

Default value

Sample

Desc_

type

integer

No

1

1

Enable Port Scan Protection:

1: Enable 2: Disable

allow_ports

array[integer]

No

-

-

List of Allowed Ports for Connection

Пример запроса

{
"base_info": {
"name": "string",
"default_browser": 0,
"kernel_version": "string",
"system_type": 0,
"group_id": 0,
"proxy_id": 0
},
"account_info": {
"username": "string",
"password": "string",
"cookie": "string",
"platform_name": "string",
"custom_platform_url": "string",
"after_startup_config": {
"after_startup": 2,
"auto_open_urls": [
"string"
]
}
},
"advanced_setting": {
"ua": "string",
"timezone": "string",
"web_rtc": 3,
"geolocation": {
"type": 1,
"location_follow_ip": "true",
"longitude": "string",
"lattitude": "string",
"accuracy": "string"
},
"language_list": [
"string"
],
"resolution": "string",
"font_list": [
"string"
],
"canvas": 1,
"web_gl": {
"type": 1,
"metadata": 3
},
"audio_context": 1,
"media_device": 1,
"client_rects": 1,
"speech_voices": 1,
"concurrent_hardware_num": 4,
"device_memory": 8,
"do_not_track": 2,
"bluetooth": 1,
"battery": 1,
"port_scan_protection": {
"type": 1,
"allow_ports": [
0
]
}
}
}

Возврат данных

{
"ret": 0, //error code
"msg": "string", //error info.
"data": {
"id": 0 //browser profile ID
}
}

1.6 Изменить информацию профиля браузера

Базовая информация

POST  /профиль/редактировать

Описание интерфейса: Чтобы изменить параметры профиля браузера, включая имя профиля браузера, информацию о прокси-сервере и информацию о группе, Поддерживаются только версии системы между 1.9.7.18 и 1.9.20.18 (в настоящее время поддерживается только на компьютерах с Windows).

Параметры запроса

Параметры заголовка

Parameter name

Type

Required

Default value

Sample

Desc_

x-api-key

string

Yes

-

-

Each MoreLogin user has their own special API-key, you can see in the system api page

Параметры тела, дополнительные параметры можно опустить. Формат параметра — JSON.

Parameter name

Type

Required

Default value

Sample

Desc_

id

integer

Y

-

1685585192182

Browser profile ID

name

string

N

-

P-1

Browser profile name(Maximum 64 characters)

proxy_id

integer

N

-

-

Proxy ID bound to the browser profile. Use 0 to indicate no binding or to clear the currently bound proxy.

group_id

integer

N

-

-

Group ID. Use 0 to indicate no group is set or to clear the existing group.

Возврат данных

{
"ret": 0, //error code
"status": "success",
"msg": "string" //error information
}

1.7 Удалить профиль браузера

Базовая информация

POST  /profile/delete

IОписание интерфейса: Удаление ненужных профилей браузера. Поддерживается только однократное удаление. Поддерживаются только версии системы между 1.9.7.18 и 1.9.20.18 (в настоящее время поддерживается только на компьютерах с Windows).

Параметры запроса

Параметры заголовка

Parameter name

Type

Required

Default value

Sample

Desc_

x-api-key

string

Yes

-

-

Each MoreLogin user has their own special API-key, you can see in the system api page

Параметры тела, дополнительные параметры можно опустить. Формат параметра — JSON.

Parameter name

Type

Required

Default value

Sample

Desc_

id

integer

Yes

-

-

Browser profile ID

Возврат данных

{
"ret": 0, //error code
"status": "success",
"data": [],
"msg": "string" //error information
}

1.8 Получить список профилей браузера

Базовая информация

GET  /profile/list

Описание интерфейса: Запрос информации добавленных профилей браузера. Пользователи могут запрашивать информацию только из профилей браузера, для которых у них есть разрешение. Поддерживаются только версии системы между 1.9.7.18 и 1.9.20.18 (в настоящее время поддерживается только на компьютерах с Windows).

Параметры запроса

Параметры запроса. Необязательные параметры можно опустить.

Parameter name

Type

Required

Default value

Sample

Desc_

page

integer

N

1

1

Page number: Default 1, used when the number of pages large and needs to be turned

page_size

integer

N

10

20

Page size: Default 10 per page, maximum 100

Параметры заголовка

Parameter name

Type

Required

Default value

Sample

Desc_

x-api-key

string

Yes

-

-

Each MoreLogin user has their own special API-key, you can see in the system api page

Return data

{
"ret": 0,
"msg": "string"
"data": [ //browser profile list
{
"id": 0, //browser profile ID
"name": "string", //browser profile name
"proxy_id": 0, //Proxy ID bound to the browser profile
"group_id": 0 //Group ID of the browser profile
"default_browser": 0
}
],
"count": 0, //total count number
}

1.9 Получить список версий ядра браузера

Базовая информация

POST  /profile/browser/kernel_version/list

Описание интерфейса: Получить версию ядра браузера. Эту информацию о версии ядра можно использовать в расширенном интерфейсе создания профиля браузера. Поддерживаются только версии системы между 1.9.7.18 и 1.9.20.18 (в настоящее время поддерживается только на компьютерах с Windows).

Параметры заголовка

Parameter name

Type

Required

Default value

Sample

Desc_

x-api-key

string

Yes

-

-

Each MoreLogin user has their own special API-key, you can see in the system api page

Параметры запроса.

Parameter name

Type

Required

Default value

Sample

Desc_

browser

integer

Yes

-

-

Default Browser:

0:Chrome 1:Firefox

Return data

{
"ret": 0,
"msg": "string",
"data": { //Browser Kernel Version List
"id": 0
}
}


How did we do?