update and remove sitelink asset ads php

Skip to first unread message

Turkmeks DEV

Jan 31, 2023, 5:56:26 AMJan 31
to Google Ads API and AdWords API Forum
when ı updated site links  give me error like this

Request Id : a96meqnkqlLnHykRjHVvbw mutate_error Error Code  Resource was not found.
 how can ı update sitelink asset and remove site links

my code :

          // Creates an extension feed item using the specified feed item ID and sitelink text.
        $extensionFeedItem = new ExtensionFeedItem([
            'resource_name' => ResourceNames::forExtensionFeedItem($customerId, $feedItemId),
            'sitelink_feed_item' => new SitelinkFeedItem(['link_text' => $sitelinkText])

        // Constructs an operation that will update the extension feed item, using the FieldMasks
        // utility to derive the update mask. This mask tells the Google Ads API which attributes of
        // the extension feed item you want to change.
        $extensionFeedItemOperation = new ExtensionFeedItemOperation();

        // Issues a mutate request to update the extension feed item.
        $extensionFeedItemServiceClient = $googleAdsClient->getExtensionFeedItemServiceClient();
        $response = $extensionFeedItemServiceClient->mutateExtensionFeedItems(

        // Prints the resource name of the updated extension feed item.
        /** @var ExtensionFeedItem $updatedExtensionFeedItem */
        $updatedExtensionFeedItem = $response->getResults()[0];
            "Updated extension feed item with resource name: '%s'.%s",

Google Ads API Forum Advisor

Jan 31, 2023, 11:50:18 AMJan 31
to devtu...@gmail.com, adwor...@googlegroups.com

Thanks for reaching out to the Google Ads API Forum.

I can see that your concern has also been raised in another email with the subject “google ads php- update sitelink asset from campaign”.

Please refrain from opening duplicate threads with the same content for better tracking of the issue.

Google Logo
Google Ads API Team

Reply all
Reply to author
0 new messages