adwords api。通过templateAd,我们可以创建视频广告。但是adwords api中的视频广告系列也不支持。制作视频广告时出错。
No handlers could be found for logger "googleads.soap"
Traceback (most recent call last):
File "test_videoAdd.py", line 105, in <module>
main(adwords_client, 62216880120)
File "test_videoAdd.py", line 86, in main
ads = ad_group_ad_service.mutate(operations)
File "/home/sys1010/.local/lib/python2.7/site-packages/googleads/common.py", line 1391, in MakeSoapRequest
e.detail, errors=error_list, message=e.message)
googleads.errors.GoogleAdsServerFault: [OperationAccessDenied.MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT @ operations[0]]
我的代码是
import urllib2
from googleads import adwords
AD_GROUP_ID = '62216880120'
def main(client, ad_group_id):
# Initialize appropriate service.
ad_group_ad_service = client.GetService('AdGroupAdService', version='v201806')
video = {
'xsi_type': 'Video',
'youTubeVideoIdString': "https://www.youtube.com/watch?v=CRTlNFPQCHk",
'type': 'VIDEO'
}
ad_data = {
'uniqueName': 'adData',
'fields': [
{
'name': 'video',
'fieldMedia': video,
'type': 'VIDEO'
}
]
}
video_ad = {
'xsi_type': 'TemplateAd',
'name': 'Ad for video',
'templateId': 49,
'finalUrls': ['https://www.google.com'],
'displayUrl': 'www.google.com?tip=ENTER_YOUR_OWN_FINAL_AND_DISPLAY_URLS',
'dimensions': {
'width': '300',
'height': '250'
},
'templateElements': [ad_data]
}
ad_group_ad = {
'adGroupId': ad_group_id,
'ad': video_ad,
'status': 'PAUSED'
}
operations = [
{
'operator': 'ADD',
'operand': ad_group_ad
}
]
ads = ad_group_ad_service.mutate(operations)
有人可以帮我解决这个错误。是否有任何库可以通过编程方式创建视频广告系列。