Hi all,
I have been trying to upload an HTLM5 file using the Google Ads API.
Here is part of the code I am using:
# Create Media
media_file = media_file_operation.create
media_file.id.value = 123435
media_file.type = client.get_type('MediaTypeEnum',
version='v2').MEDIA_BUNDLE
media_file.mime_type = client.get_type('MimeTypeEnum',
version='v2').HTML5_AD_ZIP
zf = open('/teste/teste.html.zip', 'rb').read()
media_file.media_bundle.data.value=zf
# Add media
try:
media_file_response =
media_file_service.mutate_media_files(customer_id, [media_file_operation])
except google.ads.google_ads.errors.GoogleAdsException as ex:
print('Request with ID "%s" failed with status "%s" and includes
the '
'following errors:' % (ex.request_id, ex.error.code().name))
for error in ex.failure.errors:
print('\tError with message "%s".' % error.message)
if error.location:
for field_path_element in
error.location.field_path_elements:
print('\t\tOn field: %s' %
field_path_element.field_name)
media_file_resource_name=media_file_response.results[0].resource_name
return media_file_resource_name
However I am facing the following error:
Request made: ClientCustomerId: 6365753748, Host: googleads.googleapis.com:443,
Method: /google.ads.googleads.v2.services.MediaFileService/MutateMediaFiles,
RequestId: mnNVhyrI6CkRofYeJ4VsXA, IsFault: True, FaultMessage: Custom exits
not allowed in HTML5 entry.
Request with ID "mnNVhyrI6CkRofYeJ4VsXA" failed with status "INVALID_ARGUMENT"
and includes the following errors:
Error with message "Custom exits not allowed in HTML5 entry."
Does anybody know what part am I doing incorrectly or even if it's possible to
add an HTML5 via API to an App Campaign?
Kind regards,
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/a021abc8-2c22-4a2a-ab55-abd0a1a1e299%40googlegroups.com.