Media Bundle Asset Upload

63 views
Skip to first unread message

Sergey Zilberman

unread,
Mar 29, 2020, 11:37:11 AM3/29/20
to AdWords API and Google Ads API Forum

Hi all!

There is an issue with upload of media bundles.

Getting "unknown" error:

{ "message": "Request contains an invalid argument.", "code": 3, "status": "INVALID_ARGUMENT", "details": [ { "@type": 0, "data": "type.googleapis.com\/google.ads.googleads.v2.errors.GoogleAdsFailure" }, { "@type": 0, "data": [ { "errorCode": { "requestError": "UNKNOWN" }, "message": "The error code is not in this version.", "location": { "fieldPathElements": [ { "fieldName": "operations", "index": "0" } ] } } ] } ] }

and after that, I checked the file in Google UI and it works there.

Full code:

$mediaBundleAsset = new MediaBundleAsset();
$mediaBundleAsset
->setDataUnwrapped(file_get_contents($playable_url));


$asset
= new Asset();
$asset
->setNameUnwrapped($playable_name);
$asset
->setType(AssetType::MEDIA_BUNDLE);
$asset
->setMediaBundleAsset($mediaBundleAsset);


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


$assetServiceClient
= $googleAdsClient->getAssetServiceClient();
$response
= $assetServiceClient->MutateAssets($account_id, [$assetOperation]);


almost same code for image, video asset works...


The error still occurs:

Response
-------
Headers: {
    "request-id": "LrDpC6pCM614H6v0gq54Og",
    "date": "Thu, 26 Mar 2020 15:58:36 GMT",
    "alt-svc": "quic=\":443\"; ma=2592000; v=\"46,43\",h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000"
}

Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: {"errors":[{"errorCode":{"requestError":"UNKNOWN"},"message":"The error code is not in this version.","location":{"fieldPathElements":[{"fieldName":"operations","index":"0"}]}}]}


In Google Ads UI same file works (see screenshot)

Selection_111.png

Google Ads API Forum Advisor Prod

unread,
Mar 30, 2020, 1:13:06 PM3/30/20
to sergey.z...@kenshoo.com, adwor...@googlegroups.com
Hi Sergey,

Thanks for providing these details. I'll have a look at this request and see what is causing these issues.

Regards,
Anthony
Google Ads API Team

ref:_00D1U1174p._5001UZV1tL:ref

Google Ads API Forum Advisor Prod

unread,
Apr 1, 2020, 12:42:03 PM4/1/20
to sergey.z...@kenshoo.com, adwor...@googlegroups.com
Hi Sergey,

The error coming up from the back end is MEDIA_UPLOAD_ERROR_CUSTOM_EXIT_NOT_ALLOWED which is because you are trying to write a custom exit for HTML5 bundles, which is not allowed. We're looking to update the error message so that you will see this error in the future rather than UNKNOWN.

Sergey Zilberman

unread,
Apr 5, 2020, 3:29:05 AM4/5/20
to AdWords API and Google Ads API Forum


Thanks, but why I can use this file in Google ads UI and I don't see errors there?

Google Ads API Forum Advisor Prod

unread,
Apr 6, 2020, 11:49:19 AM4/6/20
to sergey.z...@kenshoo.com, adwor...@googlegroups.com
Hi Sergey,

I will need to check to see if this behavior is API specific and will update you.
Reply all
Reply to author
Forward
0 new messages