$zipBytes = file_get_contents('html5-bundle-generic.zip');

$mediaAsset = new MediaBundleAsset([
'data' => new BytesValue(['value' => $zipBytes])
]);

// Creates the logo image.
$logoMediaFile = new Asset([
'type' => AssetType::MEDIA_BUNDLE,
'name' => new StringValue(['value' => 'Campaign #teste'])
]);

$logoMediaFile->setMediaBundleAsset($mediaAsset);



$assetOperation = new AssetOperation();
$assetOperation->setCreate($logoMediaFile);

$assetsServiceClient = $googleAdsClient->getAssetServiceClient();
$response = $assetsServiceClient->mutateAssets($customerId, [$assetOperation
]);

die($response->getResourceName());

$displayUploadAd = new DisplayUploadAdInfo([
'display_upload_product_type' => DisplayUploadProductType::HTML5_UPLOAD_AD,
'media_bundle' => new AdMediaBundleAsset(['asset' => new StringValue([
'value' => $response->getResourceName()])])
]);

On Monday, 3 June 2019 19:51:20 UTC+1, adsapiforumadvisor wrote:
>
> Hello, 
>
> Could you please share the complete request and response logs where you're 
> receiving this error? You can share the details privately via Reply 
> privately to author option. 
>
> Regards,
> Bharani, Google Ads API Team
>
> ref:_00D1U1174p._5001UBl8KL: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/03d5778c-e420-49af-87b7-6aa6e47cce70%40googlegroups.com.
  • Error on upload h... 'Diogo Pereira' via AdWords API and Google Ads API Forum
    • RE: Error on... Google Ads API Forum Advisor Prod
      • Re: Erro... 'Diogo Pereira' via AdWords API and Google Ads API Forum
        • Re: ... 'Diogo Pereira' via AdWords API and Google Ads API Forum
    • Re: Error on... Google Ads API Forum Advisor Prod

Reply via email to