Adwords API AdgroupExtensionSetting Service WRITE_ACCESS_DENIED Error

394 views
Skip to first unread message

MCC Test

unread,
Jul 14, 2015, 2:35:16 AM7/14/15
to adwor...@googlegroups.com
Hello All,

From Past few days I am getting error like WRITE_ACCESS_DENIED while posting new sitelinks via adwords api.I am using AdGroupExtensionSettingService to create new sitelinks under adgroups.

"[Jul 14 2015 02:23:27.000000 - ERROR] effectiveUser=xxx-xxx-xxxx service=AdGroupExtensionSettingService method=mutate operators={ADD: 4} operations=4 units= server=adwords.google.com isFault=true faultMessage=[EntityAccessDenied.WRITE_ACCESS_DENIED @ operations[0].operand.extensionSetting.extensions, EntityAccessDenied.WRITE_ACCESS_DENIED @ operations[1].operand.extensionSetting.extensions, EntityAccessDenied.WRITE_ACCESS_DENIED @ operations[2].operand.extensionSetting.extensions, EntityAccessDenied.WRITE_ACCESS_DENIED @ operations[3].operand.extensionSetting.extensions]"

Before few days it was all working good suddenly recently started getting error.

Please look into this.

Thanks,
Ronak Shah

Anthony Madrigal

unread,
Jul 14, 2015, 10:13:31 AM7/14/15
to adwor...@googlegroups.com, ppcte...@gmail.com
Hello Ronak,

Could you please Reply privately to author your SOAP request and response where you are getting this error?

Thanks,
Anthony
AdWords API Team

Josh Radcliff (AdWords API Team)

unread,
Jul 14, 2015, 5:23:00 PM7/14/15
to adwor...@googlegroups.com, adwordsapiadvi...@google.com, ppcte...@gmail.com
Hi Ronak,

I noticed in the SOAP request you sent to Anthony that you are setting the sitelinkUrl field of your SitelinkFeedItem. As announced in a blog post in May, this field is now read-only, and you should be setting sitelinkFinalUrls instead. Please see the blog post and our guide on upgraded URLs for more information.

Thanks,
Josh, AdWords API Team

MCC Test

unread,
Jul 15, 2015, 1:41:46 AM7/15/15
to adwor...@googlegroups.com, ppcte...@gmail.com, adwordsapiadvi...@google.com
Hello Josh,

Thank you very much for your response.Yes I have resolved error by making use of sitelinkFinalUrls . Also I assume that in textAd we also need to make use finalUrls  for setting up the destination Url instead of url.

Thanks,
Ronak Shah 

Josh Radcliff (AdWords API Team)

unread,
Jul 15, 2015, 9:21:30 AM7/15/15
to adwor...@googlegroups.com, ppcte...@gmail.com, ppcte...@gmail.com
Hi Ronak,

Yes, that's correct. You'll also want to set finalUrls on BiddableAdGroupCriterion instead of destinationUrl.

By the way, sorry about the bad link to the blog. :) Here's the correct one:


Cheers,
Josh, AdWords API Team

and...@nehow.com

unread,
Jul 15, 2015, 9:49:02 AM7/15/15
to adwor...@googlegroups.com
Why I failed by replacing the sitelinkurl to sitelinkFinalUrls?
and replace the sitelinkurl with sitelinkFinalUrls, the script failed:
suds.WebFault: Server raised fault: 'Unmarshalling Error: cvc-complex-type.2.3: Element 'ns0:sitelinkFinalUrls' cannot have character [children], because the type's content type is element-only. '

Josh Radcliff (AdWords API Team)

unread,
Jul 15, 2015, 2:41:52 PM7/15/15
to adwor...@googlegroups.com, and...@nehow.com
Hi,

That won't quite work because sitelinkUrl is a string element, but sitelinkFinalUrls is an array of URLs. Please try passing your final URL as a single element array instead and post back if that does not resolve the issue for you.

A Neuen

unread,
Aug 31, 2015, 2:49:03 PM8/31/15
to AdWords API Forum
I am getting the same error using version v201502:


Are the examples here:
https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/v201502/extensions/add_site_links.py#L55

wrong?

I tried to replace with sitelinkFinalUrls as suggested in an answer and I get the same as a user below:

suds.WebFault: Server raised fault: 'Unmarshalling Error: cvc-complex-type.2.3: Element 'ns0:sitelinkFinalUrls' cannot have character [children], because the type's content type is element-only. '

Josh Radcliff (AdWords API Team)

unread,
Aug 31, 2015, 4:35:37 PM8/31/15
to AdWords API Forum
Hi,

It looks like that example is outdated. I'll speak with the owner of that library to have that fixed.

In the meantime, could you try making the following changes and let me know if you still run into errors?
  1. Specify sitelinkFinalUrls instead of sitelinkUrl
  2. Set sitelinkFinalUrls to an array containing your final URL
Thanks,
Josh, AdWords API Team

A Neuen

unread,
Sep 1, 2015, 4:45:54 AM9/1/15
to AdWords API Forum
OK I what you suggested:
1. replaced sitelinkUrl with sitelinkFinalUrls
2. instead of a string I pass an array ( 'sitelinkFinalUrls': ['http://www.awesome.com']


I get a an exception:

Traceback (most recent call last):
 
File ".../app/utils/actions.py", line 110, in perform
    ret
= self.callback(self.order, *self.args)
 
File ".../app/scheduler/funcs.py", line 80, in do
    d
= adw.create_sitelinks(order)
 
File ".../app/services/adword_service/adwordwrapper.py", line 235, in create_sitelinks
    response
= campaign_extension_setting_service.mutate([operation])
 
File ".virtualenvs/adwiz/lib/python2.7/site-packages/googleads/common.py", line 296, in MakeSoapRequest
   
for arg in args])
 
File "/home/lawalpha9marketi/.virtualenvs/adwiz/lib/python2.7/site-packages/suds/client.py", line 542, in __call__
   
return client.invoke(args, kwargs)
 
File virtualenvs/adwiz/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
    result = self.send(soapenv)
  File "
.virtualenvs/adwiz/lib/python2.7/site-packages/suds/client.py", line 649, in send
    result = self.failed(binding, e)
  File "
.virtualenvs/adwiz/lib/python2.7/site-packages/suds/client.py", line 702, in failed
    r, p = binding.get_fault(reply)
  File adwiz/lib/python2.7/site-packages/suds/bindings/binding.py"
, line 265, in get_fault
   
raise WebFault(p, faultroot)
WebFault: Server raised fault: 'Unmarshalling Error: cvc-complex-type.2.3: Element 'ns1:sitelinkFinalUrls' cannot have character [children], because the type's content type is element-only. '

A Neuen

unread,
Sep 1, 2015, 5:00:50 AM9/1/15
to AdWords API Forum
Here is the message the library sents:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
   
xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
   
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201502"
   
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   
xmlns:tns="https://adwords.google.c
om/api/adwords/cm/v201502"

   
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   
<SOAP-ENV:Header>
       
<tns:RequestHeader>
           
<tns:clientCustomerId>xxxx</tns:clientCustomerId>
           
<tns:developerToken>xxxx</tns:developerToken>
           
<tns:userAgent>my ua</tns:userAgent>
           
<tns:validateOnly>false</tns:validateOnly>
           
<tns:partialFailure>false</tns:partialFailure>
       
</tns:RequestHeader>
   
</SOAP-ENV:Header>
   
<ns0:Body>
       
<ns1:mutate>
           
<ns1:operations>
               
<ns1:operator>ADD
               
</ns1:operato
r>
               
<ns1:operand>
                   
<ns1:campaignId>xxxx</ns1:campaignId>
                   
<ns1:extensionType>SITELINK</ns1:extensionType>
                   
<ns1:extensionSetting>
                       
<ns1:extensions xsi:type="ns1:SitelinkFeedItem">
                           
<ns1:ExtensionFeedItem.Type>SitelinkFeedItem</ns1:ExtensionFeedItem.Type>
                           
<ns1:sitelinkTe
xt>Kontakt
                           
</ns1:sitelinkText>
                           
<ns1:sitelinkFinalUrls>http://xxxx.de</ns1:sitelinkFinalUrls>
                       
</ns1:extensions>
                       
<ns1:extensions xsi:type="ns1:SitelinkFeedItem">
                           
<ns1:ExtensionFeedItem.Type>SitelinkFeedItem</ns1:ExtensionFeedItem.Type>
                           
<ns1:sitelinkTex
t>Dienstleistungen
                           
</ns1:sitelinkText>
                           
<ns1:sitelinkFinalUrls>http://xxxx.de</ns1:sitelinkFinalUrls>
                       
</ns1:extensions>
                       
<ns1:extensions xsi:type="ns1:SitelinkFeedItem">
                           
<ns1:ExtensionFeedItem.Type>SitelinkFeedItem</ns1:ExtensionFeedItem.Type>
                           
<ns1:sit
elinkText>Dienstleister
                           
</ns1:sitelinkText>
                           
<ns1:sitelinkFinalUrls>http://xxxx.de</ns1:sitelinkFinalUrls>
                       
</ns1:extensions>
                       
<ns1:extensions xsi:type="ns1:SitelinkFeedItem">
                           
<ns1:ExtensionFeedItem.Type>SitelinkFeedItem</ns1:ExtensionFeedItem.Type>
                           
<ns1:sitelinkText>Gebäudereinigung
                           
</ns1:sitelinkText>
                           
<ns1:sitelinkFinalUrls>http://xxxx.de</ns1:sitelinkFinalUrls>
                       
</ns1:extensions>
                   
</ns1:extensionSetting>
               
</ns1:operand>
           
</ns1:operations>
       
</ns1:mutate>
   
</ns0:Body>
</SOAP-ENV:Envelope>

Josh Radcliff (AdWords API Team)

unread,
Sep 1, 2015, 9:51:42 AM9/1/15
to AdWords API Forum
Hi,

Sorry, I was a bit off-base in my recommendation.

The type of the sitelinkFinalUrls field is UrlList, so the code should actually be:

  sitelink1 = {
      'xsi_type': 'SitelinkFeedItem',
      'sitelinkText': 'Store Hours',
      'sitelinkFinalUrls': {'urls': ['http://www.example.com/storehours']}
  }

Could you give that a try and let me know if you still encounter errors?

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages