Setting Lable Id's

20 views
Skip to first unread message

Javier Marin

unread,
Feb 28, 2022, 7:57:31 AM2/28/22
to Google Ads API and AdWords API Forum
Hi there,
I'm using the Adwords API, following your official guide I could manage to create new labels for my adwords account using the LableService.

However, these new labels are assigned an "internal" lable_id which I would like to have control of, since I'm creating the same labels for multiple accounts.
I would like to know if is it possible to assign an ID to a label when creating it.

Here's a snippet of the python code i'm using to create new labels in case you need it:

label_service = client.GetService('LabelService', version='v201809')
operations = [
{
"xsi_type": "LabelOperation",
"operator": "ADD",
"operand": {
"xsi_type": "TextLabel",
"name": 'Test Label'
}
}
]
result = label_service.mutate(operations)

Thanks in advance, 
Best Regards, 

Google Ads API Forum Advisor

unread,
Feb 28, 2022, 8:56:59 PM2/28/22
to jma...@funiglobal.com, adwor...@googlegroups.com

Hello Javier,

Thank you for reaching out to us.

There is no way to manually assign the label ID since it is automatically assigned by the system. What you can do instead is utilize the label name when creating same labels for multiple accounts.

As an aside, please note that the AdWords API is deprecated and will be sunset on April 27, 2022. We strongly recommend that you migrate to the Google Ads API as soon as possible.

Regards,

Google Logo
Mark Kevin
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q2Xju19:ref
Reply all
Reply to author
Forward
0 new messages