MCC account
・Get information for all Display Ads accounts under the MCC
function getAllMccAccounts() {
const managerAccountId = AdsUtilities.getCurrentAccountId();
const accountLinks = Display.AccountLinkService.get({
mccAccountId: managerAccountId,
}).rval;
if (accountLinks.totalNumEntries == 0) {
Logger.log('accountId does not exist.');
return;
}
for (let i = 0; i < accountLinks.values.length; i++){
let accountLink = accountLinks.values[i].accountLink;
Logger.log('accountId-> ' + accountLink.accountId
+ ', ownerShipType-> ' + accountLink.ownerShipType);
}
}