Google AdWords API-AdGroupAdError CANNOT_CREATE_DEPRECATED_ADS

问题描述 投票:0回答:1

我正在使用Google AdWords Python SDK创建ResponsiveDisplayAd。我的代码如下。

adgroup_ad_service = adwords_client.GetService(
    service_name = "AdGroupAdService",
    version = "v201809"
)

operations = [{
    'operator': 'ADD',
    'operand': {
        'xsi_type': 'AdGroupAd',
        'adGroupId': '<AD_GROUP_ID>',
        'ad': {
            'xsi_type': 'ResponsiveDisplayAd',
            'marketingImage': {
                'mediaId': '<MEDIA_ID>'
            },
            'shortHeadline': 'Short Headline',
            'longHeadline': 'This is a very long headline',
            'description': 'This is a description',
            'businessName': 'Test Business Name',
            'finalUrls': ['https://www.google.com'],
            'squareMarketingImage': {
                'mediaId': '<MEDIA_ID>'
            }
        },
        'status': 'PAUSED'
    }
}]

ads_response = adgroup_ad_service.mutate(operations)

print("AD RESPONSE : {}".format(ads_response))

但是它给了我AdGroupAdError.CANNOT_CREATE_DEPRECATED_ADS

根据documentation,此错误描述为An ad of this type is deprecated and cannot be created. Only deletions are permitted.

但是在AdGroupAd ResponsiveDisplayAd]的文档中,是可接受的广告类型之一。

因此,如果有人可以向我指出解决此问题的方向,那就太好了。

我正在使用Google AdWords Python SDK来创建ResponsiveDisplayAds。我的代码如下。 adgroup_ad_service = adwords_client.GetService(service_name =“ AdGroupAdService”,版本=“ ...

python google-adwords
1个回答
1
投票

使用AddMultiAssetResponsiveDisplayAd

© www.soinside.com 2019 - 2024. All rights reserved.