Thanks for your attention, but I have solved this with this code: private void linkSitelinksToAdGroup(GoogleAdsClient googleAdsClient, List<String> sitelinkAssetResourceNames, AddSitelinkUsingAssetsParams params) { // Creates AdGroupAssets representing the association between sitelinks and ad groups. List<AdGroupAssetOperation> adGroupAssetOperations = sitelinkAssetResourceNames.stream().map(resName -> AdGroupAsset.newBuilder() .setAsset(resName) .setAdGroup(ResourceNames.adGroup(params.customerId, params.adGroupId)) .setFieldType(AssetFieldType.SITELINK) .build()) // Creates an AdGroupAssetOperation to create the AdGroupAsset. .map(a -> AdGroupAssetOperation.newBuilder().setCreate(a).build()) .collect(Collectors.toList()); // Creates the service client. try (AdGroupAssetServiceClient client = googleAdsClient.getLatestVersion().createAdGroupAssetServiceClient()) { // Sends the mutate request. MutateAdGroupAssetsResponse response = client.mutateAdGroupAssets(String.valueOf(params.customerId), adGroupAssetOperations); // Prints some information about the result. for (MutateAdGroupAssetResult result : response.getResultsList()) { System.out.printf("Linked sitelink to ad group with resource name '%s'.%n", result.getResourceName()); } } }
On Wednesday, February 14, 2024 at 7:50:22 AM UTC-3 Google Ads API Forum Advisor wrote: > Hi, > > Thank you for contacting the Google Ads API support team. > > I will check with our team regarding your issue and one of my team members > will reach out to you once we have an update on this. Meanwhile, your > patience is highly appreciated. > > > This message is in relation to case "ref:!00D1U01174p.!5004Q02rz63n:ref" > > Thanks, > > [image: Google Logo] Google Ads API Team > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/39f25bf7-bb1c-4717-ac1c-e917000ec276n%40googlegroups.com.