I see you changed Adwords API. How I can remove and add video to adgroup for UniversalAppCampaign? Can you give me a code example of this on Python? Thank you!
I try to remove video from adgroup, but receiving this:
Error summary: {'faultMessage': '[OperatorError.OPERATOR_NOT_SUPPORTED @ operations[0]]', 'requestId': '00059004711962c10a379b91e10e93f3', 'serviceName': 'AdService', 'methodName': 'mutate', 'operations': '1', 'responseTime': '95'}
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/googleads/common.py", line 1382, in MakeSoapRequest
*packed_args, _soapheaders=soap_headers)['body']['rval']
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/proxy.py", line 42, in __call__
self._op_name, args, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 132, in send
return self.process_reply(client, operation_obj, response)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 194, in process_reply
return self.process_error(doc, operation)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 299, in process_error
detail=fault_node.find('detail'))
zeep.exceptions.Fault: [OperatorError.OPERATOR_NOT_SUPPORTED @ operations[0]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/i.tirsky/PycharmProjects/googleadw/campaign_mutate.py", line 202, in <module>
c.remove_media_ids()
File "/Users/i.tirsky/PycharmProjects/googleadw/campaign_mutate.py", line 139, in remove_media_ids
ads = self.ad_service.mutate(operations)['value']
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/googleads/common.py", line 1394, in MakeSoapRequest
e.detail, errors=error_list, message=e.message)
googleads.errors.GoogleAdsServerFault: [OperatorError.OPERATOR_NOT_SUPPORTED @ operations[0]]
My code is:
operations = [{
'operator': 'REMOVE',
'operand': {
'id': 123, #ad id,
'xsi_type': 'UniversalAppAd',
'videos': [
{
'asset': {
'xsi_type': 'YouTubeVideoAsset',
'youTubeVideoId': 'xxxx', #youtube video id
},
},
],
},
}]
self.ad_service = client.GetService('AdService', version='v201809')
ads = self.ad_service.mutate(operations)