Hi,
Thank you for contacting support. With regards to your concern, it looks like you are trying to make changes to the resource_name for the label which is not expected when you create a new label using LabelOperation.create operation. Please refer to this guide for more details on label resource. Let us know if you need additional help.
Regards,
Nikisha Patel, Google Ads API Team
[
{
"Operation": {
"CampaignBudgetOperation": {
"Operation": {
"Create": {
"resource_name": "customers/809xxxx186/campaignBudgets/-1",
"amount_micros": {
"value": 100500000
},
"delivery_method": 2,
"explicitly_shared": {},
"period": 2,
"type": 2
}
}
}
}
},
{
"Operation": {
"LabelOperation": {
"Operation": {
"Create": {
"resource_name": "customers/809xxxx186/labels/-2",
"name": {
"value": "yyy:zzz:777"
},
"text_label": {
"background_color": {
"value": "#940CFE"
},
"description": {
"value": "generated label"
}
}
}
}
}
}
},
{
"Operation": {
"CampaignOperation": {
"Operation": {
"Create": {
"resource_name": "customers/809xxxx186/campaigns/-3",
"name": {
"value": "Test Campaign"
},
"status": 3,
"advertising_channel_type": 4,
"shopping_setting": {
"merchant_id": {
"value": 121868788
},
"sales_country": {
"value": "RU"
},
"campaign_priority": {}
},
"campaign_budget": {
"value": "customers/809xxxx186/campaignBudgets/-1"
},
"bidding_strategy_type": 9,
"CampaignBiddingStrategy": {
"TargetSpend": {
"cpc_bid_ceiling_micros": {
"value": 10000000
}
}
}
}
}
}
}
},
{
"Operation": {
"CampaignLabelOperation": {
"Operation": {
"Create": {
"campaign": {
"value": "customers/809xxxx186/campaigns/-3"
},
"label": {
"value": "customers/809xxxx186/labels/-2"
}
}
}
}
}
}
]Hi,
Thanks for sharing the detailed information. From the logs shared, it looks like you have specified the resource name for create operation while creating new label. This is the reason you are getting the following error. Please refer this code sample to add campaign label. Let us know if this helps.
Regards,
Nikisha Patel, Google Ads API Team