Setting sitelinkUrl throws DESTINATION_URL_DEPRECATED error

40 views
Skip to first unread message

Suresh Kumar Shenbagam

unread,
Aug 21, 2019, 6:33:51 AM8/21/19
to AdWords API and Google Ads API Forum
Hi,

Language: Java.

I am trying to create Sitelink extension for a campaign and I am not able to set value to sitelinkUrl parameter and am getting the following exception,

 [main] ERROR c.c.a.ErrorContainer [] - ApiException{applicationExceptionType=ApiException, errors=[UrlError{apiErrorType=UrlError, errorString=UrlError.DESTINATION_URL_DEPRECATED, fieldPath=operations[0].operand.extensionSetting.extensions[0].sitelinkUrl, fieldPathElements=[FieldPathElement{field=operations, index=0}, FieldPathElement{field=operand}, FieldPathElement{field=extensionSetting}, FieldPathElement{field=extensions, index=0}, FieldPathElement{field=sitelinkUrl}], reason=DESTINATION_URL_DEPRECATED, trigger=}]}


Is this normal? How can I set the sitelink url for this extension through Adwords Java API?

Suresh

Pete Lavetsky (AdWords API Guru)

unread,
Aug 21, 2019, 8:24:28 AM8/21/19
to AdWords API and Google Ads API Forum
Suresh,

What is the destination URL you're attempting to set?

Pete

Suresh Kumar Shenbagam

unread,
Aug 21, 2019, 1:15:26 PM8/21/19
to AdWords API and Google Ads API Forum
Hi Pete,

Thanks for the response. I am setting the below url,

"sitelinkUrl":"http://sitelinke.com"

Suresh

Suresh Kumar Shenbagam

unread,
Aug 21, 2019, 1:19:07 PM8/21/19
to AdWords API and Google Ads API Forum
Update:

If I set the parameter sitelinkUrl to http://sitelinke.com - it throws DESTINATION_URL_DEPRECATED error
But, if I set sitelinkFinalUrls like this,
"sitelinkFinalUrls" : {
          "urls" : [ "http://cs.com" ]
        }
then it works.

Is it not possible to set value for sitelinkUrl parameter? I do not see any documentation mentioning this parameter is deprecated. Please clarify.

Suresh.

Google Ads API Forum Advisor Prod

unread,
Aug 21, 2019, 2:45:21 PM8/21/19
to suresh.s...@cloudsense.com, adwor...@googlegroups.com
Hi Suresh, 

The Destination Url field is deprecated and cannot be set through the API. These are replaced with Final URLs as part of the URL upgrade. Please refer to this help center article for more information. You may refer to our code samples in Java as a reference on how to add the Sitelink Extension. Code samples in other languages can be found here

Let me know if you have any further questions.

Thanks,
Bharani, Google Ads API Team 

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