Create window browser
Request method and path
html
POST http://localhost:[post]/openapi/window/browser/create?ticket=[OpenApiToken]
Interface function description
Used to create window browsers
Request parameter
Header Request Data
name | value | required | type | Explanation |
---|---|---|---|---|
Content-Type | application/json | Y | String | application/json |
Body Request parameter
Parameter Name | Required | type | Explanation |
---|---|---|---|
windowName | Y | string | Custom window names (between 2 and 30 characters in length) |
ipProxySetting | Y | object | Configuration information object about the proxy View the detailed description of configuration objects |
browserSettingInfo | Y | object | Configuration information object about the browser kernel View the detailed description of configuration objects |
advancedSettingInfo | Y | object | Advanced configuration information object about Windows View the detailed description of configuration objects |
shouldChangeFingerprint | N | bool | The default is true; true: The fingerprint needs to be replaced. Note: When false, the Settings for browserSettingInfo and advancedSettingInfo are invalid because the last opened fingerprint is to be continued |
openUrlArray | N | string | Default open links (write only one URL in a line '\r\n', after the URL do not have any modifier added by yourself! And the character length is between 0 and 200) |
notes | N | string | Remarks for the window (characters between 0 and 16) |
Request parameter example
json
{
"windowName": "bj111y",
"ipProxySetting": {
"type": "null",
"host": "11",
"port": "2324",
"account": "",
"password": ""
},
"browserSettingInfo": {
"brand": "chrome",
"version": "122.0.6261.95"
},
"advancedSettingInfo": {
"webRTC": "disabled",
"platform": "Win32",
"useragentMode": "strict"
},
"shouldChangeFingerprint": true,
"openUrlArray": "https://www.baidu.com\r\nhttps://www.51job.com",
"notes": "窗口的备注信息"
}
Parameter detail
ipProxySetting Description of key values of configuration parameter objects
Parameter Name | Required | type | Explanation |
---|---|---|---|
type | Y | string | null | Agent types: [socks5 | HTTPS | HTTP | null ] null for direct mode, don't use the proxy |
host | Y | string | Proxy host (200 characters or less) |
prot | Y | string | Proxy port (no more than a positive integer string of 65535 or '' |
account | N | string | Agent's account number (200 characters or less) |
password | N | string | Agent's password ( 100 characters or less) |
browserSettingInfo Description of key values of configuration parameter objects
Parameter Name | Required | type | Explanation |
---|---|---|---|
brand | Y | string | Kernel types and supported kernel versions can be dynamically obtained through interfaces. Click to obtain documents |
version | Y | string |
advancedSettingInfo Description of key values of configuration parameter objects
Parameter Name | Required | type | Explanation |
---|---|---|---|
webRTC | Y | string | webRTC value:[disabled | really ] |
platform | Y | string | platform value:[Win32 | MacIntel | iPhone | iPad | Android ] |
useragentMode | Y | string | useragentMode value:[really | common | strict ] |
openUrlArray Parameter detail
openUrlArray
is string type data, the length is between 0 and 200, multiple urls are separated by '\r\n'.
Example of Interface Response Result
Successful Response Example
return parameters
newWindowBrowserKey
is the unique identifier of the newly created window.
json
{
"code": "00000",
"message": "Success",
"data": {
"status": "success",
"errorCode": "",
"errorMsg": "",
"result": {
"newWindowBrowserKey": 123
}
}
}
Example of failed response
Failed to call interface
When the interface response status code is not '00000', the interface call fails.
The specific interface call Reason for error can be queried by viewing the Interface Response Status Code Information Comparison Table.
json
{
"code": "00001",
"message": "产生未知错误,请反馈给官方客服!",
"data": {}
}
This operation failed
json
{
"code": "00000",
"message": "Success",
"data": {
"status": "failed",
"errorCode": "E01",
"errorMsg": "缺少参数(xxx)",
"result": {}
}
}
Operation failure errorCode error code information comparison table
Error code | Reason for error |
---|---|
E00 | The format of parameter (xxx) is incorrect! |
E01 | Missing parameter (xxx). |
E02 | The parameters are redundant. |
E03 | Missing parameter (xxx) in ipProxySetting. |
E04 | The parameters in ipProxySetting are redundant. |
E05 | The unique window number key is about to exceed the maximum allowed value of 1000. Please delete some of the later list items and try again! |
E06 | The string length of windowName must be between 2 and 30. |
E07 | ipProxySetting. type [proxy type] must be one of: socks5, https, http, or null and must be filled in (null indicates: direct connection mode, i.e.: no proxy is used). |
E08 | The character length of ipProxySetting.host [proxy host] must be between 1 and 200, and ipProxySetting.host can only be an empty string when ipProxySetting.type is null . |
E09 | ipProxySetting.port The proxy port must be a positive integer string, and ipProxySetting. host can only be an empty string if ipProxySetting. type is null . |
E10 | ipProxySetting.port The proxy port cannot exceed 65535! |
E11 | ipProxySetting.account The character length of the proxy account must be less than or equal to 200 and can be an empty string. |
E12 | ipProxySetting.password The proxy password must be less than or equal to 100 characters in length and can be an empty string. |
E13 | openUrlArray The default open link must have a character length of 200 or less and can be an empty string. |
E14 | Notes: The character length must be less than or equal to 20 and can be an empty string. |
E15 | We are about to exceed the maximum window capacity of 200. Please delete some lists and try again! |