const axios = require('axios');
let data = JSON.stringify({
"common": {
"platform": "macos",
"browserType": "anty",
"useragent": {
"mode": "manual",
"value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
},
"webrtc": {
"mode": "altered",
"ipAddress": null
},
"canvas": {
"mode": "noise"
},
"webgl": {
"mode": "real"
},
"webglInfo": {
"mode": "random"
},
"geolocation": {
"mode": "real",
"latitude": null,
"longitude": null
},
"cpu": {
"mode": "real",
"value": null
},
"memory": {
"mode": "manual",
"value": 8
},
"timezone": {
"mode": "auto",
"value": null
},
"locale": {
"mode": "auto",
"value": null
}
},
"items": [
{
"name": "s",
"tags": [
"Autoreger"
],
"mainWebsite": "",
"notes": {
"content": "s",
"color": "red",
"style": "text",
"icon": null
},
"proxy": null,
"statusId": 0,
"doNotTrack": false
}
]
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://dolphin-anty-api.com/browser_profiles/mass',
headers: {
'Content-Type': 'application/json',
'AUTHORIZATION': 'Bearer токен'
},
data : data
};
console.log('2lg'); // выводит в консоль
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
var ids = JSON.stringify(response.data.ids)
console.log(ids); // уже не выводит в консоль
[[ID]] = ids; // по какой-то причине ничего не присваивает переменной БАСа
})
.catch((error) => {
console.log(error); // так же не выводит это в консоль
});
console.log('3lg') // выводит в консоль