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 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v2.services#assetservice>
>  
> since the new Ad requires a MediaBundleAsset 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v2.common#mediabundleasset>.
>  
> Additionally, make sure you follow the instructions in this guide 
> <https://support.google.com/google-ads/answer/1722096>  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.

Reply via email to