Re: When you create a series, you upload HTML5 and make a mistake.

2018-01-10 Thread 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
Hi,

As I have said previously, only the IMAGE media type is currently supported 
for UAC campaigns via the AdWords API. The YoutubeVideoMedia and the HTML5 
assets are still not supported for UAC campaigns. You can check this guide 

 for 
more information regarding UAC campaigns. If you really want to add an 
HTML5 asset in your UAC campaign, then you need to add this via the AdWords 
UI.

As for the HTML5 asset which is supported in the API, this is only 
available in template ads 
 
under 
other campaign types which are non-UAC campaigns.

Thanks,
Vincent
AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/21c787f1-8d83-4184-96da-2ce7f634a84a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: When you create a series, you upload HTML5 and make a mistake.

2018-01-10 Thread mengjunzhu837
I still want to upload html5 in AUC, what should I do?

在 2018年1月10日星期三 UTC+8下午2:56:04,mengju...@gmail.com写道:
>
> Collection uploadMediaBundles = FileUtils.listFiles(new 
> File(campaignItem.html5_path), null, false);
> if (uploadMediaBundles.size() > 0) {
> MediaServiceInterface mediaService =
> adWordsServices.get(session, MediaServiceInterface.class);
> ArrayList mediaBundles = new ArrayList<>();
> ArrayList md5List = new ArrayList<>();
> for (File file : uploadMediaBundles) {
> String fileName = file.getAbsolutePath().toLowerCase();
> if (fileName.endsWith("zip")) {
> MediaBundle mediaBundle = new MediaBundle();
> mediaBundle.setData(
> 
> com.google.api.ads.common.lib.utils.Media.getMediaDataFromFile(file));
> mediaBundle.setType(MediaMediaType.MEDIA_BUNDLE);
>
> mediaBundles.add(mediaBundle);
> }
> }
> if (mediaBundles.size() > 0) {
> Media[] media = new Media[mediaBundles.size()];
> for (int i = 0; i < mediaBundles.size(); i++) {
> media[i] = mediaBundles.get(i);
> }
> 
> Media[] result = mediaService.upload(media);
>
> 
> long[] mediaIds = new long[result.length];
> for (int i = 0; i < result.length; i++) {
> mediaIds[i] = result[i].getMediaId();
> }
> universalAppSetting.setImageMediaIds(mediaIds);
> }
> }
>
>
> CampaignService Method: mutate clientCustomerId: 590-416-6793 URL: 
> https://adwords.google.com/api/adwords/cm/v201708/CampaignService Request 
> ID: 0005626678a389790a6267986302ce02 ResponseTime(ms): 497 OperationsCount: 
> 1 IsFault: true FaultMessage: 
> ApiException{applicationExceptionType=ApiException, 
> errors=[SettingError{apiErrorType=SettingError, 
> errorString=SettingError.MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN, 
> fieldPath=operations[0].operand.settings[0].imageMediaIds[0], 
> fieldPathElements=[FieldPathElement{field=operations, index=0}, 
> FieldPathElement{field=operand}, FieldPathElement{field=settings, index=0}, 
> FieldPathElement{field=imageMediaIds, index=0}], 
> reason=MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN, trigger=3356164502}]}
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7c15abac-e28e-496d-babe-d985689980ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: When you create a series, you upload HTML5 and make a mistake.

2018-01-10 Thread 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
Hi,

>From the MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN 

 error 
itself, it means that you are referencing an unsupported media type for the 
universal app campaign. The imageMediaIds 

 of 
a universal app campaign only supports landscape images and not an HTML5  
or MEDIA_BUNDLE type.

Please set an IMAGE media type for a universal app campaign and let me know 
if you encounter any issues after doing this.

Thanks,
Vincent
AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/791806a9-2e93-4e1c-8251-1ce8da7c3eed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


When you create a series, you upload HTML5 and make a mistake.

2018-01-09 Thread mengjunzhu837


Collection uploadMediaBundles = FileUtils.listFiles(new 
File(campaignItem.html5_path), null, false);
if (uploadMediaBundles.size() > 0) {
MediaServiceInterface mediaService =
adWordsServices.get(session, MediaServiceInterface.class);
ArrayList mediaBundles = new ArrayList<>();
ArrayList md5List = new ArrayList<>();
for (File file : uploadMediaBundles) {
String fileName = file.getAbsolutePath().toLowerCase();
if (fileName.endsWith("zip")) {
MediaBundle mediaBundle = new MediaBundle();
mediaBundle.setData(

com.google.api.ads.common.lib.utils.Media.getMediaDataFromFile(file));
mediaBundle.setType(MediaMediaType.MEDIA_BUNDLE);

mediaBundles.add(mediaBundle);
}
}
if (mediaBundles.size() > 0) {
Media[] media = new Media[mediaBundles.size()];
for (int i = 0; i < mediaBundles.size(); i++) {
media[i] = mediaBundles.get(i);
}

Media[] result = mediaService.upload(media);


long[] mediaIds = new long[result.length];
for (int i = 0; i < result.length; i++) {
mediaIds[i] = result[i].getMediaId();
}
universalAppSetting.setImageMediaIds(mediaIds);
}
}


CampaignService Method: mutate clientCustomerId: 590-416-6793 URL: 
https://adwords.google.com/api/adwords/cm/v201708/CampaignService Request 
ID: 0005626678a389790a6267986302ce02 ResponseTime(ms): 497 OperationsCount: 
1 IsFault: true FaultMessage: 
ApiException{applicationExceptionType=ApiException, 
errors=[SettingError{apiErrorType=SettingError, 
errorString=SettingError.MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN, 
fieldPath=operations[0].operand.settings[0].imageMediaIds[0], 
fieldPathElements=[FieldPathElement{field=operations, index=0}, 
FieldPathElement{field=operand}, FieldPathElement{field=settings, index=0}, 
FieldPathElement{field=imageMediaIds, index=0}], 
reason=MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN, trigger=3356164502}]}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0499ea77-09f7-4fb7-a37f-8cde445b59f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.