Re: Upload and connect html 5 ad in google ads api

2019-12-10 Thread Google Ads API Forum Advisor Prod
Hi,

Thank you for sharing that info. Can you please share the detailed request and 
response logs via reply privately to author so that I can further investigate 
the issue? You can find information on enabling logging here.

Please make sure you have followed the instructions here to create the zip file 
for a dynamic product type.

Regards,
Mitchell
Google Ads API Team
ref:_00D1U1174p._5001UOE7Gs:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CxAGN0Q2B03H003rsoYeZwSq6LU5r51kFEZw%40sfdc.net.


Re: Upload and connect html 5 ad in google ads api

2019-12-09 Thread Adhub manager
Hi Mitchell

I tried doing as you said i changed my method to upload it like an asset:
public static MutateAssetResult UploadHtml5(string filepath)
{
AssetServiceClient assetService = client.GetService(Services.V2.
AssetService);


MutateAssetsRequest req = new MutateAssetsRequest();


var data = File.ReadAllBytes(filepath);
req.Operations.Add(new AssetOperation
{
Create = new Asset
{
MediaBundleAsset = new MediaBundleAsset
{
Data = ByteString.CopyFrom(data)
},
Type = AssetTypeEnum.Types.AssetType.MediaBundle,
Name = "testbundle1",

}
});
req.CustomerId = customerId.ToString();
var result = assetService.MutateAssets(req);
return result.Results.First();

}

This however ended up giving me another error message 
"The error code is not in this version."

im using latest version of google ads api c# for nuget:
https://github.com/googleads/google-ads-dotnet 
2.6.0

Am i missing an argument maybe?

Thank you for your time!

On Monday, December 9, 2019 at 6:50:46 PM UTC+1, adsapiforumadvisor wrote:
>
> Hi,
>
> Thank you for reaching out. Instead of using the MediaFileService to 
> create your media_bundle you need to use the AssetService 
> 
>  
> since the new Ad requires a MediaBundleAsset 
> .
>  
> Additionally, make sure you follow the instructions in this guide 
>   when creating an 
> HTML5 ad.
>
> Regards,
> Mitchell
> Google Ads API Team
>
> ref:_00D1U1174p._5001UOE7Gs:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/34174ede-9f64-400b-b4fd-5c949a5f4a23%40googlegroups.com.


RE: Upload and connect html 5 ad in google ads api

2019-12-09 Thread Google Ads API Forum Advisor Prod
Hi,

Thank you for reaching out. Instead of using the MediaFileService to create 
your media_bundle you need to use the AssetService since the new Ad requires a 
MediaBundleAsset. Additionally, make sure you follow the instructions in this 
guide when creating an HTML5 ad.

Regards,
Mitchell
Google Ads API Team
ref:_00D1U1174p._5001UOE7Gs:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/SFbLt0Q29AW000W2gSI8WvRICGyDNVkD4x2A%40sfdc.net.


Upload and connect html 5 ad in google ads api

2019-12-09 Thread Adhub manager
Hi friends!

I am currently trying to get html5 upload to work, but im running into an 
issue when i try to create an ad i can connect to an adgroup.

Let me explain.

1. Create a campaign

2. Create an adgroup

3. Upload html 5

4. Create ad with html 5 ad.

Im stuck on 4 where i am trying to use the api like this from a c# client.

public static void AssetConnectionToAd(string 
mediaBundleResourceName, string adgroup)
{
AdGroupAdServiceClient adgroupServiceClient = client.GetService(
Services.V2.AdGroupAdService);
var req = new MutateAdGroupAdsRequest();
req.Operations.Add(new AdGroupAdOperation {
Create = new AdGroupAd
{
Ad = new Ad
{

DisplayUploadAd = new DisplayUploadAdInfo
{
DisplayUploadProductType = 
DisplayUploadProductTypeEnum.Types.DisplayUploadProductType.
DynamicHtml5CustomAd,
MediaBundle = new AdMediaBundleAsset
{
Asset = mediaBundleResourceName
}
},
},
AdGroup = adgroup,  

}

});
req.CustomerId = customerId.ToString();
   var ad = adgroupServiceClient.MutateAdGroupAds(req);
}

If i try to connect this i get an error message:
"Resource name 'customers/6282670156/mediaFiles/26325216408' is malformed: 
expected 'customers/{customer_id}/assets/{part_1}'."

I am suspecting im uploading it wrong since its creating the resource in 
another place with /mediafiles and not /assets.

My upload method:

public static MutateMediaFileResult UploadHtml5(string filepath)
{
MediaFileServiceClient mediaService = client.GetService(Services
.V2.MediaFileService);

MutateMediaFilesRequest req = new MutateMediaFilesRequest();

var data = File.ReadAllBytes(filepath);
req.Operations.Add(new MediaFileOperation()
{
Create = new MediaFile
{
MediaBundle = new MediaBundle
{
Data = ByteString.CopyFrom(data)   

},
Type = MediaTypeEnum.Types.MediaType.MediaBundle   


}
});
req.CustomerId = customerId.ToString();
  var result = mediaService.MutateMediaFiles(req);
return result.Results.First();   

}

This will return 'customers/6282670156/mediaFiles/26325216408'

I have tested my bundle from the google ads ui and run a succesful campaign 
with the asset so it is working, however i think im using the wrong upload 
service.

Can anyone advise? 

Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4146cbde-503d-4bde-adb4-8d3cdaf65839%40googlegroups.com.