Bug in mutateAdGroupAdLabels

40 views
Skip to first unread message

Hector Villasante

unread,
Jun 24, 2019, 1:18:53 PM6/24/19
to AdWords API and Google Ads API Forum
adGroupAdLabel = AdGroupAdLabel.newBuilder()
 
.setAdGroupAd(
 
StringValue.of(ResourceNames.adGroupAd(accountId, adGroupId, adId))
 
)
 
.setLabel(StringValue.of(ResourceNames.label(accountId, labelId)))
 
.build

operation
= AdGroupAdLabelOperation.newBuilder()
 
.setCreate(adGroupAdLabel)
 
.build()


adGroupAdLabelOperationList
.append(operation)


result
= service
 
.mutateAdGroupAdLabels(accountId, adGroupAdLabelOperationList, true, false)

// This result list returns a wrong return name by the API
result
[0].getResourceName == `customers/{customer_id}/adGroupAdLabels/{ad_id}~{ad_group_id}~{label_id}`
// and it should be
result[0].getResourceName == `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}`
//The ad_group_id and the ad_id are returned in the wrong place
//After the call, this other method call fails unless you fix the position of the ids:

val adLabel = client.getVersion1.createAdGroupAdLabelServiceClient().getAdGroupAdLabel(result[0].getResourceName)


Here's the simplified code I'm using to attach an existing label to a adGroupAd, when testing it I found out that the result resource name is wrong.

Tested with the latest version as of now (3.0.1) and got the same result.



GetYourGuide Deutschland GmbH

Erich-Weinert-Straße 145, 10409 Berlin, Germany

Geschäftsführer: Johannes Reck, Tao Tao, Nils Chrestin

Amtsgericht Charlottenburg HRB 132059 B; USt-IdNr. DE276456081


Icon_4.png

Google Ads API Forum Advisor Prod

unread,
Jun 24, 2019, 5:11:26 PM6/24/19
to hector.v...@getyourguide.com, adwor...@googlegroups.com
Hello Hector, 

I was able to replicate the issue. I have shared this information with the team. I will keep you posted on the updates.

Thanks,
Bharani, Google Ads API Team

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