使用API接口导入cookie至浏览器

使用API接口导入cookie至浏览器:

Request Url:

http://127.0.0.1:35000/api/v1/profile/cookies/import/webext

Request Type: POST

名称类型描述必传
profileIdstring浏览器配置文件IDtrue
bodystringcookie json (需要 base64 编码 )true

Body
x-www-form-urlencoded

{
    "profileId": "17D40B01-566A-4E3F-888A-C40A404668B8",
    "body": [
                {
                    "hostOnly": false,
                    "secure": false,
                    "httpOnly": false,
                    "domain": ".vmlogin.com.cn",
                    "session": false,
                    "expirationDate": 1620743803,
                    "value": "Xrli9YsFVTw.0AAAEC",
                    "path": "\/",
                    "name": "CMID",
                    "storeId": null,
                    "sameSite": "unspecified"
                },
                {
                    "hostOnly": false,
                    "secure": false,
                    "httpOnly": false,
                    "domain": ".vmlogin.com.cn",
                    "session": false,
                    "expirationDate": 1596983803,
                    "value": "9960",
                    "path": "\/",
                    "name": "CMPRO",
                    "storeId": null,
                    "sameSite": "unspecified"
                }
            ]
}


注:

(1)使用本地接口时,需在客户端启动“浏览器自动化设置”并保存设置,教程请参考“开启浏览器自动化端口”

(2)profileId请参考“配置文件ID(Profile ID)在哪”教程或者使用profile/list的api接口获取所有profileId。