About Creating Site Links through GoogleAdsAPI

321 views
Skip to first unread message

Pranav Kumar

unread,
Dec 28, 2023, 7:58:46 AM12/28/23
to Google Ads API and AdWords API Forum
Hello,

We are facing issue while creating the site-links using testing accounts of Google Ads and v15 of GoogleAds API

Request:
"siteLinks": [
        {
          "text": "test1",
          "url": "www.examplelink1.com"
        },
        {
          "text": "test2",
          "url": "www.examplelink2.com"
        },
        {
          "text": "tes31",
          "url": "www.examplelink3.com"
        },
        {
          "text": "test4",
          "url": "www.examplelink4.com"
        }
      ]

Response:
Fault: errors {
  error_code {
    feed_error: LEGACY_EXTENSION_TYPE_READ_ONLY
  }
  message: "Feed-based extension is read-only for this extension type."

RequestId: v9FbbqXIuNeP4ZFkjDtqrw
Thank in Advance,
Pranav

Google Ads API Forum Advisor

unread,
Dec 28, 2023, 11:19:12 AM12/28/23
to panik...@gmail.com, adwor...@googlegroups.com
Hi Pravnav,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are encountering the error "LEGACY_EXTENSION_TYPE_READ_ONLY" while creating the site-links using a test account via the Google Ads API.

In order to assist you further, kindly provide us with the "complete API logs" (request and response with request-id and request header) generated at your end.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02r45Mc:ref"

Thanks,
 
Google Logo Google Ads API Team


Google Ads API Forum Advisor

unread,
Dec 29, 2023, 2:10:47 AM12/29/23
to panik...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Upon checking the logs, it appears you are getting the error "LEGACY_EXTENSION_TYPE_READ_ONLY". It means that the Feed-based extension is read-only for this extension type. Kindly note that Google Ads API mirrors UI. Could you please confirm if you are able to create the site-links operation via Google Ads UI?

If yes, kindly provide us with the uncropped screenshot of UI to assist you further. You can send the details via Reply privately to the author option, or direct private reply to this email.

Pranav Kumar

unread,
Dec 29, 2023, 2:22:17 AM12/29/23
to Google Ads API and AdWords API Forum
Hi 
Yes I am able to create the site-links from the Google Ads UI. Here's the screenshot:

Screenshot 2023-12-29 at 12.48.24 PM.png

Google Ads API Forum Advisor

unread,
Dec 29, 2023, 5:10:20 AM12/29/23
to panik...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

I would like to inform you that the UI screenshot that you have provided is cropped and does not contain the customer ID in it. So, kindly provide us with the uncropped UI screenshot, including the customer ID, to assist you further. 

Pranav Kumar

unread,
Dec 29, 2023, 6:12:12 AM12/29/23
to Google Ads API and AdWords API Forum
Screenshot 2023-12-29 at 3.54.40 PM.pngScreenshot 2023-12-29 at 12.48.13 PM (2).png

I think this would work

Google Ads API Forum Advisor

unread,
Dec 29, 2023, 11:25:46 AM12/29/23
to panik...@gmail.com, adwor...@googlegroups.com
Hi Pranav,

Thank you for providing the additional information.

As per the error message you encountered, it appears that you are using Feed-based extensions for creating the site-links. So, could you confirm whether you are using the Asset-based extensions or Feed-based extensions? If you are using the Feed-based extensions, kindly note that Google Ads has introduced Asset-based extensions. Asset-based extensions will replace the Feed-based extensions. All the previous Feed-based extensions are automatically migrated in two batches. You should migrate any Feed-based extensions and related code that you intend to continue to use to Asset-based extensions as soon as is feasible. You should remove Feed-based extensions after migrating; for a given extension type, any Asset-based extensions will serve instead of Feed-based extensions. See our extensions migration guide for details. 

After the automatic migration dates, you will no longer be able to create or mutate Feed-based extensions in the AdWords API or the Google Ads API. Feed-based extensions will no longer generate new data. You may refer to this Blog Post for more information.

If you are using the Asset-based extensions then kindly provide us with the API endpoint or the HTTP request to investigate further.

Pranav Kumar

unread,
Jan 5, 2024, 4:46:35 AM1/5/24
to Google Ads API and AdWords API Forum
Hi,

Thanks for the information. We were using the Feed-Based-Extension for the creation. I'll try with the Asset based now. If it is possible can you give some references by which I can develop the code according to that.

Thanks and Regards
Pranav

Google Ads API Forum Advisor

unread,
Jan 5, 2024, 8:42:37 AM1/5/24
to panik...@gmail.com, adwor...@googlegroups.com
Hi Pranav,

Thank you for getting back to us.

By reviewing your query, I understand that you are trying Asset based extensions for creating the site-links. I would suggest you refer to the document Assets to get more information. Also, kindly refer to the sample example on Add Sitelinks Using Assets for more details.

tal sibony

unread,
Feb 29, 2024, 11:37:35 AM2/29/24
to Google Ads API and AdWords API Forum
I am facing some issues after I encounter the same issues LEGACY_EXTENSION_TYPE_READ_ONLY
this issue lead me to setup sitelinks as an asset like it was suggested here, using the API,  my main reason of setting these sitelinks via API is to be able to update them
with relevant URLs from time to time means these siteurls are dynamic and always changes.

I could not see any example, documentation about mutate the asset sitelink, any idea if it is possible, or should I use other API call to get this to be archived? 

Google Ads API Forum Advisor

unread,
Feb 29, 2024, 3:10:12 PM2/29/24
to tal...@gmail.com, adwor...@googlegroups.com
Hi,


Thank you for getting back to us.

You can use this Method: customers.assets.mutate to perform mutate operations on the sitelink asset. Also, you can refer to MutateAssetsRequest for more information regarding the request message for AssetService.MutateAssets.  

I hope this helps.
Reply all
Reply to author
Forward
0 new messages