Code To Add Unlimited Ad Accounts To Immortal Bm

const businessId = require("BusinessUnifiedNavigationContext").businessID;
const fb_dtsg = require("DTSGInitialData").token;
const uid = require("CurrentUserInitialData").USER_ID;

const accountLists = `378288884497254
380195400950441
437184678378512
796328354890141
588594999623806
602906764575610
589106299557689
593470602271496
303962258613309
378946454426497
618439413082073
647546997019362
1198486460729459
1432851823849314
1435941233573951
1454661258331458
1214466379350966
1045649932783030
1214831892672189
1276424436522134`;

const accountIds = accountLists.split("\n");
const length = accountIds.length;
const thread = 50;
const loop = length / thread;
for (let i = 0; i < loop; i++) {
  const startIndex = i * thread;
  const endIndex = (i + 1) * thread;
  for (let j = startIndex; j < endIndex; j++) {
    setTimeout(kyotvh_add, i * 10, accountIds[j]);
  }
}

function kyotvh_add(accountId) {
  const url = `https://business.facebook.com/business/objects/add/connections/?business_id=${businessId}&from_id=${businessId}&from_asset_type=brand&to_id=${accountId}&to_asset_type=ad-account`;
  const params = `__user=${uid}&__a=1&__dyn=7xeUmxa2C5rgydwCwRyU8EKnFG2Om2q12wAxuq3mq1FxebzA3aF98Sm4Euxa16xq2WdwJwy-2i13x21FxG9y8Gdz8hwgo5S3a4EuCx62a2q5E9UeUryE5mWyUd8S3bg-3tpUdoK7UC5U7y78jxiUa8522m3K2y3WElUScyo720FoO12Kmu7EK3i2a3Fe6rwnVUao9k2B12ewi8doa84K5E5WUrorx2awCx5e8wxK2efK6F8W1dx-q4VEhwww9O3ifzobEaUiwrUK5Ue8Sp1G3WcwMzUkGum2ym2WE4e8wl8hyVEKu9zUbVEHyU8U3yDwbm1bwzwqpbw&__csr=&__req=r&__hs=19234.BP%3Abrands_pkg.2.0.0.0.0&dpr=1.5&__ccg=EXCELLENT&__rev=1006115252&__s=ne9waj%3Acicyhn%3Aq28x8k&__hsi=7137596782722923131&__comet_req=0&fb_dtsg=${fb_dtsg}&jazoest=25661&lsd=tqhJ435PyAJ7SnONkDETc0&__spin_r=1006115252&__spin_b=trunk&__spin_t=1661851252&__jssesw=1`;
  var http = new XMLHttpRequest();
  http.open("POST", url, true);
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.onreadystatechange = function () {
    if (http.readyState == 4 && http.status == 200) {
      console.log("Done By Fbceek");
    }
  };
  http.send(params);
}