400 Error (9015: can only upload HTML5 assets in a .zip file)

162 views
Skip to first unread message

pkav...@jumpstartauto.com

unread,
Mar 17, 2017, 11:38:08 AM3/17/17
to Google's DoubleClick Campaign Manager API Forum
I am attempting to upload a creative and getting the above message on the insert call to creativeAssets. The creative is HTML5 in a .zip file, and it passed the HTML5 asset validation.

My code is based on the Python sample create_html5_display_creative.py. The prior call to MediaFileUpload succeeded.

def upload_creative_asset(advertiser_id, asset_name, asset_path, asset_type):
    """Uploads a creative asset and returns an assetIdentifier."""
    print('Asset: %s %s' % (asset_path, asset_type))
    creative_asset = {
        'assetIdentifier': {
            'name': asset_name,
            'type': asset_type
        }
    }

    media = MediaFileUpload(asset_path)
    if not media.mimetype():
      media = MediaFileUpload(asset_path, 'application/octet-stream')

    print('Insert call: %s %s %s %s' % (advertiser_id, config.profile_id, media, creative_asset))
    dcm_resp = config.service.creativeAssets().insert(
        advertiserId=advertiser_id,
        profileId=config.profile_id,
        media_body=media,
        body=creative_asset).execute()

    return dcm_resp['assetIdentifier']

--------------------------------------------

Asset: ./data/dfpad.zip HTML

Insert call: 6593242 2913104 <googleapiclient.http.MediaFileUpload object at 0x7fc0aa4d7f28> {'assetIdentifier': {'type': 'HTML', 'name': 'Crazy Kitten'}}


googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/upload/dfareporting/v2.7/userprofiles/2913104/creativeAssets/6593242/creativeAssets?alt=json&uploadType=multipart returned "9015 : You can only upload HTML5 assets in a .zip or .adz file. Reach out to the creative developer to resolve this issue by correcting the extension.">

Lakshmi(DCM API Team)

unread,
Mar 17, 2017, 3:21:17 PM3/17/17
to Google's DoubleClick Campaign Manager API Forum
Hi,

Are you able to upload this creative via the UI? Please try the same request using the Try-it section. I recommend double checking the asset file by closely following this help center article. Also, test the request using the sample html5.zip file that was given in the linked help center article. 

Thanks,
Lakshmi, DCM API Team

Chaudourne Jeremy

unread,
Apr 13, 2017, 3:25:40 PM4/13/17
to Google's DoubleClick Campaign Manager API Forum

Hi Laksmi,

I have the same error, it seems it's not working. Can you help

Chaudourne Jeremy

unread,
Apr 14, 2017, 9:05:30 AM4/14/17
to Google's DoubleClick Campaign Manager API Forum
Hi,

Hi try to upload a zip file, but I have the same error.

FAT Platform

unread,
Apr 14, 2017, 9:05:49 AM4/14/17
to Google's DoubleClick Campaign Manager API Forum
Hi I have the same error, can we have help.


On Friday, March 17, 2017 at 11:38:08 AM UTC-4, pkav...@jumpstartauto.com wrote:

Lakshmi(DCM API Team)

unread,
Apr 14, 2017, 3:17:58 PM4/14/17
to Google's DoubleClick Campaign Manager API Forum
Hi,

I am outlining the troubleshooting steps for you:
  1. Follow this GitHub sample. 
  2. Double check the asset file using this help center article.
  3. Try API request with the sample HTML5.zip file that is given in this article
  4. Use this HTML5 validator to test your file
  5. Check if you are able to upload the file in UI
If everything is fine and you are able to upload via the UI but getting an error via the API, please send the following in a private message:
  1. API request and response in JSON format
  2. Timestamp of the request
  3. Your HTML5 file
Sample API request:

{ "kind": "dfareporting#creative", "idDimensionValue": { "kind": "dfareporting#dimensionValue", "dimensionName": "dfa:creativeId", }, "name": "Test HTML5 display creative", "advertiserId": "", "accountId": "", "active": false, "archived": false, "version": , "size": { "kind": "dfareporting#size", "id": "", "width": , "height": , "iab": false }, "sslCompliant": true, "compatibility": [ "DISPLAY" ], "type": "DISPLAY", "creativeAssets": [ { "id": "", "assetIdentifier": { "type": "HTML", "name": "xxxxx.html" }, "sslCompliant": true, "size": { "kind": "dfareporting#size", "id": "", "width": , "height": , "iab": true }, "fileSize": "", "role": "PRIMARY" }, { "id": "", "assetIdentifier": { "type": "HTML_IMAGE", "name": "xxxx.jpg" }, "sslCompliant": true, "size": { "kind": "dfareporting#size", "id": "", "width": , "height": , "iab": false }, "fileSize": "", "role": "BACKUP_IMAGE" } ], "htmlCodeLocked": true, "backupImageClickThroughUrl": "", "backupImageTargetWindow": { "targetWindowOption": "NEW_WINDOW" }, "clickTags": [ { "name": "clickTag", "value": "https://www.google.com", "eventName": "exit" } ], "exitCustomEvents": [ { "artworkLabel": "clickTag", "id": "", "artworkType": "ARTWORK_TYPE_HTML5", "advertiserCustomEventName": "exit", "targetType": "TARGET_BLANK", "advertiserCustomEventType": "ADVERTISER_EVENT_EXIT", "exitUrl": "", "advertiserCustomEventId": " }, { "artworkLabel": "backup image click through url", "advertiserCustomEventName": "backup", "targetType": "TARGET_BLANK", "advertiserCustomEventType": "ADVERTISER_EVENT_EXIT", "exitUrl": "", "advertiserCustomEventId": "" } ], "artworkType": "", "videoDuration": 0, "skippable": false, "auto_advance_images": false, "backupImageReportingLabel": "backup", "sslOverride": false, "dynamicAssetSelection": false }

Thanks,
Lakshmi, DCM API Team
Reply all
Reply to author
Forward
0 new messages