Create Label example request

92 views
Skip to first unread message

Patrick

unread,
Feb 7, 2022, 8:01:33 AM2/7/22
to Google Ads API and AdWords API Forum
Hello,

I can't seem to find an example of how to create a Label via the api.  There are examples on how to attach an already existing label but none on how to create one from scratch.

Could you point me in the right direction, otherwise please could an example be created, it isn't that obvious (to me at least) the relationship between Label TextLabel and the actual label in the UI.  E.g. do you need a TextLabel at all if you're just after a simple label with a name?

I'm using the php library, but after a very quick look it doesn't look like there are examples in other client libraries either.

Thanks

Patrick

unread,
Feb 7, 2022, 8:07:58 AM2/7/22
to Google Ads API and AdWords API Forum
Also not entirely sure this Label documentation is entirely correct, it doesn't mention Label at all only TextLabel? 

Google Ads API Forum Advisor

unread,
Feb 7, 2022, 2:08:55 PM2/7/22
to gapis...@gmail.com, adwor...@googlegroups.com
Hi Patrick,

Thanks for reaching out. We do not currently have a code sample for creating a label, but you can reach out to the PHP GitHub client library owners if you need help on this. 

TextLabel is a field belonging to the Label resource. You must create a TextLabel instance, specifying values for its fields, and then include that TextLabel when creating the Label using LabelService.MutateLabels. 

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


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