Re: App Campaign Create Asset API questions

2019-11-20 Thread Google Ads API Forum Advisor Prod
Hi Naomi,

You may use the Asset resource to retrieve the specific asset details. You may 
then use the asset Id to associate them with the ads. If you're looking to 
create new assets, please refer to this code snippet which might be helpful. 
Code snippets in other languages can be found here. Can you please give this a 
try replacing the assetIds? If you're facing any issue, could you please share 
the complete request and response using Reply privately to author option, to 
investigate further?

Thanks,
Bharani, Google Ads API Team
ref:_00D1U1174p._5001UOCaSg: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/P4-u30Q19ZPA00c__8J6JTSVqZvR8k0YBtow%40sfdc.net.


Re: App Campaign Create Asset API questions

2019-11-19 Thread 'Naomi Shao' via AdWords API and Google Ads API Forum
Hi Bharani,

Thanks for the reply. However it is still not working properly on my end. 
Below is the error. 
And could you pls help me understand the resource name in 
setAsset(StringValue.of(ResourceNames.asset(customerId, 6544940770L))), 
where exactly can I find the string '6544940770L'? Let's say I want to 
create asset with a youtube video.

Thank you,
Naomi

*Response*
**
*Headers: 
Metadata(content-type=application/grpc,request-id=JNDapajHOqzoe95NLssjHQ,x-google-esf-cloud-client-params=client_project_number:
 
38977083346 backend_service_name: "googleads.googleapis.com" 
backend_fully_qualified_method: 
"google.ads.googleads.v2.services.AdGroupAdService.MutateAdGroupAds" 
,x-google-session-info=CNXvz9aUBxoEGBAoCzpqEhhnb29nbGVhZHMuZ29vZ2xlYXBpcy5jb20Y0q_cmZEBIkczODk3NzA4MzM0Ni1tNG1lN28yODVoNXVvNjVqYWZrampsNXJhOHNvbHY4NS5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbUoPOg0xLy8wZVZodTRuQW1-,date=Wed,
 
20 Nov 2019 02:42:21 
GMT,x-google-gfe-request-trace=tlei5:443,tlac73:9832,/bns/im/borg/im/bns/adwords-simply/aw-webapi-esfproxy-prod.server/29,tlac73:9832,tlei5:443,x-google-gslb-service=adwords-frontend-webapi-esfproxy,x-google-backends=[2002:a05:681c:84::]:4232,/bns/im/borg/im/bns/adwords-simply/aw-webapi-esfproxy-prod.server/29,tlac73:9832,/bns/tl/borg/tl/bns/traffic-prod/shared-layer2-gfe/58,tlei5:443,x-google-dos-service-trace=main:adwords-frontend-webapi-esfproxy,main:shared-layer2-gfe,x-google-service=adwords-frontend-webapi-esfproxy,shared-layer2-grpc-aggregate,x-google-gfe-response-code-details-trace=response_code_set_by_backend,response_code_set_by_backend,x-google-gfe-response-body-transformations=chunked,chunked,x-google-shellfish-status=CA0gBEBG,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,x-google-gfe-service-trace=adwords-frontend-webapi-esfproxy,shared-layer2-grpc-aggregate)*
*Body: null*
*Failure message: errors {*
*  error_code {*
*collection_size_error: TOO_FEW*
*  }*
*  message: "Too few."*
*  trigger {*
*string_value: ""*
*  }*
*  location {*
*field_path_elements {*
*  field_name: "operations"*
*  index {*
*  }*
*}*
*field_path_elements {*
*  field_name: "create"*
*}*
*field_path_elements {*
*  field_name: "ad"*
*}*
*field_path_elements {*
*  field_name: "app_ad"*
*}*
*field_path_elements {*
*  field_name: "headlines"*
*}*
*field_path_elements {*
*  field_name: "pinned_field"*
*}*
*  }*
*}*
*errors {*
*  error_code {*
*mutate_error: RESOURCE_NOT_FOUND*
*  }*
*  message: "Resource was not found."*
*  trigger {*
*string_value: ""*
*  }*
*  location {*
*field_path_elements {*
*  field_name: "operations"*
*  index {*
*  }*
*}*
*field_path_elements {*
*  field_name: "create"*
*}*
*field_path_elements {*
*  field_name: "ad"*
*}*
*field_path_elements {*
*  field_name: "app_ad"*
*}*
*field_path_elements {*
*  field_name: "images"*
*  index {*
*  }*
*}*
*field_path_elements {*
*  field_name: "asset"*
*}*
*  }*
*}*
*errors {*
*  error_code {*
*mutate_error: RESOURCE_NOT_FOUND*
*  }*
*  message: "Resource was not found."*
*  trigger {*
*string_value: ""*
*  }*
*  location {*
*field_path_elements {*
*  field_name: "operations"*
*  index {*
*  }*
*}*
*field_path_elements {*
*  field_name: "create"*
*}*
*field_path_elements {*
*  field_name: "ad"*
*}*
*field_path_elements {*
*  field_name: "app_ad"*
*}*
*field_path_elements {*
*  field_name: "youtube_videos"*
*  index {*
*  }*
*}*
*field_path_elements {*
*  field_name: "asset"*
*}*
*  }*
*}*


On Wednesday, November 20, 2019 at 12:31:45 AM UTC+8, adsapiforumadvisor 
wrote:
>
> Hi Naomi, 
>
> The error indicates that the image asset and video asset resource names 
> are not formed correctly. You will need to use the Asset resource as part 
> of the resource name. Please find the code snippet below:
>
> AdVideoAsset video = AdVideoAsset.newBuilder()
> .setAsset(StringValue.of(ResourceNames.asset(customerId, 6544940770L)))
> .build();
>
> AdImageAsset image = AdImageAsset.newBuilder()
> .setAsset(StringValue.of(ResourceNames.asset(customerId, 27398859L)))
> .build();
>
> AppAdInfo appadinfo = AppAdInfo.newBuilder()
> .addDescriptions(text)
> .addAllHeadlines(ImmutableList.of(text, text1))
> .addAllDescriptions(ImmutableList.of(description))
> .addAllImages(ImmutableList.of(image))
> .addAllYoutubeVideos(ImmutableList.of(video))
> .build();
>
> Please give this a try and let me know if you have any questions.
>
> Thanks,
> Bharani, Google Ads API Team
>  
>
> ref:_00D1U1174p._5001UOCaSg:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/

RE: App Campaign Create Asset API questions

2019-11-19 Thread Google Ads API Forum Advisor Prod
Hi Naomi,

The error indicates that the image asset and video asset resource names are not 
formed correctly. You will need to use the Asset resource as part of the 
resource name. Please find the code snippet below:

AdVideoAsset video = AdVideoAsset.newBuilder()
.setAsset(StringValue.of(ResourceNames.asset(customerId, 6544940770L)))
.build();

AdImageAsset image = AdImageAsset.newBuilder()
.setAsset(StringValue.of(ResourceNames.asset(customerId, 27398859L)))
.build();

AppAdInfo appadinfo = AppAdInfo.newBuilder()
.addDescriptions(text)
.addAllHeadlines(ImmutableList.of(text, text1))
.addAllDescriptions(ImmutableList.of(description))
.addAllImages(ImmutableList.of(image))
.addAllYoutubeVideos(ImmutableList.of(video))
.build();

Please give this a try and let me know if you have any questions.

Thanks,
Bharani, Google Ads API Team
ref:_00D1U1174p._5001UOCaSg: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/SBVkN0Q185WB000sMc-y2nT2ulWkbBIEZXDw%40sfdc.net.