Google App Campaign Text Asset

251 views
Skip to first unread message

mahadeb mondal

unread,
Jun 2, 2020, 12:57:56 PM6/2/20
to AdWords API and Google Ads API Forum
I tried to create text asset using  Google Ads Api


Here is my code :
const asset_1 = {
text_asset: {
text : 'test',
},
type: 5
}
const d_result_1 = await customer.assets.create(asset_1);


and found below error:

{"code":{"assetError":5},"request":{"customerId":"7591378709","operationsList":[{"create":{"resourceName":"","name":{"value":"AAAAAAA"},"type":5,"textAsset":{"text":{"value":"Description 1"}}}}]},"request_id":"UAvbIfNSHm_6wXY6A61ktA","location":"operations[0]","failure":{"code":3,"metadata":{"_internal_repr":{"google.ads.googleads.v2.errors.googleadsfailure-bin":[{"type":"Buffer","data":[10,61,10,3,216,6,5,18,36,84,104,101,32,65,115,115,101,116,46,97,115,115,101,116,95,100,97,116,97,32,111,110,101,111,102,32,105,115,32,101,109,112,116,121,46,34,16,18,14,10,10,111,112,101,114,97,116,105,111,110,115,18,0]}],"grpc-status-details-bin":[{"type":"Buffer","data":[8,3,18,37,82,101,113,117,101,115,116,32,99,111,110,116,97,105,110,115,32,97,110,32,105,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,46,26,134,1,10,67,116,121,112,101,46,103,111,111,103,108,101,97,112,105,115,46,99,111,109,47,103,111,111,103,108,101,46,97,100,115,46,103,111,111,103,108,101,97,100,115,46,118,50,46,101,114,114,111,114,115,46,71,111,111,103,108,101,65,100,115,70,97,105,108,117,114,101,18,63,10,61,10,3,216,6,5,18,36,84,104,101,32,65,115,115,101,116,46,97,115,115,101,116,95,100,97,116,97,32,111,110,101,111,102,32,105,115,32,101,109,112,116,121,46,34,16,18,14,10,10,111,112,101,114,97,116,105,111,110,115,18,0]}],"request-id":["UAvbIfNSHm_6wXY6A61ktA"],"error-code":["{\"requestError\":0,\"biddingStrategyError\":0,\"urlFieldError\":0,\"listOperationError\":0,\"queryError\":0,\"mutateError\":0,\"fieldMaskError\":0,\"authorizationError\":0,\"internalError\":0,\"quotaError\":0,\"adError\":0,\"adGroupError\":0,\"campaignBudgetError\":0,\"campaignError\":0,\"authenticationError\":0,\"adGroupCriterionError\":0,\"adCustomizerError\":0,\"adGroupAdError\":0,\"adSharingError\":0,\"adxError\":0,\"assetError\":5,\"biddingError\":0,\"campaignCriterionError\":0,\"collectionSizeError\":0,\"countryCodeError\":0,\"criterionError\":0,\"customerError\":0,\"dateError\":0,\"dateRangeError\":0,\"distinctError\":0,\"feedAttributeReferenceError\":0,\"functionError\":0,\"functionParsingError\":0,\"idError\":0,\"imageError\":0,\"languageCodeError\":0,\"mediaBundleError\":0,\"mediaUploadError\":0,\"mediaFileError\":0,\"multiplierError\":0,\"newResourceCreationError\":0,\"notEmptyError\":0,\"nullError\":0,\"operatorError\":0,\"rangeError\":0,\"recommendationError\":0,\"regionCodeError\":0,\"settingError\":0,\"stringFormatError\":0,\"stringLengthError\":0,\"operationAccessDeniedError\":0,\"resourceAccessDeniedError\":0,\"resourceCountLimitExceededError\":0,\"youtubeVideoRegistrationError\":0,\"adGroupBidModifierError\":0,\"contextError\":0,\"fieldError\":0,\"sharedSetError\":0,\"sharedCriterionError\":0,\"campaignSharedSetError\":0,\"conversionActionError\":0,\"conversionAdjustmentUploadError\":0,\"conversionUploadError\":0,\"headerError\":0,\"databaseError\":0,\"policyFindingError\":0,\"enumError\":0,\"keywordPlanError\":0,\"keywordPlanCampaignError\":0,\"keywordPlanNegativeKeywordError\":0,\"keywordPlanAdGroupError\":0,\"keywordPlanKeywordError\":0,\"keywordPlanIdeaError\":0,\"accountBudgetProposalError\":0,\"userListError\":0,\"changeStatusError\":0,\"feedError\":0,\"geoTargetConstantSuggestionError\":0,\"campaignDraftError\":0,\"feedItemError\":0,\"labelError\":0,\"billingSetupError\":0,\"customerClientLinkError\":0,\"customerManagerLinkError\":0,\"feedMappingError\":0,\"customerFeedError\":0,\"adGroupFeedError\":0,\"campaignFeedError\":0,\"customInterestError\":0,\"campaignExperimentError\":0,\"extensionFeedItemError\":0,\"adParameterError\":0,\"feedItemValidationError\":0,\"extensionSettingError\":0,\"feedItemTargetError\":0,\"policyViolationError\":0,\"mutateJobError\":0,\"partialFailureError\":0,\"policyValidationParameterError\":0,\"sizeLimitError\":0,\"notWhitelistedError\":0,\"managerLinkError\":0,\"currencyCodeError\":0,\"accessInvitationError\":0}"],"location":["operations[0]"]},"flags":0},"details":"The Asset.asset_data oneof is empty."}}


Please help me to solve this error

Google Ads API Forum Advisor Prod

unread,
Jun 2, 2020, 4:55:41 PM6/2/20
to p...@garudaadv.com, adwor...@googlegroups.com
Hi,

Thanks for these details. We'll take a look at your request and see where the issues are occurring.

Regards,
Anthony
Google Ads API Team

ref:_00D1U1174p._5004Q20VXie:ref

mahadeb mondal

unread,
Jun 3, 2020, 1:39:46 AM6/3/20
to AdWords API and Google Ads API Forum
Hi,
Thank you but please provide me solution as soon as possible.

Google Ads API Forum Advisor Prod

unread,
Jun 3, 2020, 11:08:44 AM6/3/20
to p...@garudaadv.com, adwor...@googlegroups.com
Hello,

The error message you are facing indicates that one of your "Asset.asset_data oneof is empty". You will need to make sure the asset_data is populated with the fields necessary to make a text asset. 

mahadeb mondal

unread,
Jun 4, 2020, 7:06:38 AM6/4/20
to AdWords API and Google Ads API Forum
Hi,

Here is syntax :

text_asset object
Output only. A text asset.
CHILD FIELDS
text string
Text content of the text asset.
I used same thing and passed string data into text only . so what about this "data" field is ??? i do not get this. can you please  explain syntax of text asset ???

Google Ads API Forum Advisor Prod

unread,
Jun 4, 2020, 2:37:52 PM6/4/20
to p...@garudaadv.com, adwor...@googlegroups.com
Hello,

You can find examples on how to create assets here. Although it doesn't specifically show text_assets, you can see how they use asset_data in the code.

Cheers,

mahadeb mondal

unread,
Jun 5, 2020, 12:45:17 PM6/5/20
to AdWords API and Google Ads API Forum
Is there any example related to text asset in node js ??

Google Ads API Forum Advisor Prod

unread,
Jun 5, 2020, 3:34:04 PM6/5/20
to p...@garudaadv.com, adwor...@googlegroups.com
Hello,

Unfortunately, we don't since nodejs is not one of the languages we support in our client libraries.

Regards,

mahadeb mondal

unread,
Jun 8, 2020, 5:21:48 AM6/8/20
to AdWords API and Google Ads API Forum
Thank you for your support ..
Reply all
Reply to author
Forward
0 new messages