I read the indicated document and tried the following code.

const url = 
`https://googleads.googleapis.com/v1/customers/${customer_id}/campaignBudgets:mutate`
;
const operations = {
 'operations': [
 {
 'create': {
 'name': 'new Budgets 1',
 'amount_micros': 100000,
 'total_amount_micros': 100000,
 'status': 'PAUSED',
 'delivery_method': 'STANDARD',
 'period': 'DAILY',
 'type': 'STANDARD'
 }
 }
 ]
 };

const url = 
`https://googleads.googleapis.com/v1/customers/${customer_id}/campaigns:mutate`
;
const operations = {
 'operations': [
 {
 'create': {
 'name': 'new Campaign 1',
 'advertising_channel_type': 'SEARCH',
 'status': 'PAUSED',
 'campaign_budget': 100000,
 'start_date': '20190601',
 'end_date': '20190701',
 'network_settings': {
 'target_google_search': true,
 'target_search_network': false,
 'target_content_network': false,
 'target_partner_search_network': false
 },
 'dynamic_search_ads_setting': {
 'domain_name': 'www.singlehand.jp',
 'language_code': 'jp',
 'use_supplied_urls_only': true,
 'labels': ['test']
 },
 'bidding_strategy_type': 'ENHANCED_CPC',
 'payment_mode': 'CLICKS'
 }
 }
 ]
 };

Both of the responses I received were "200 'OK' {}". Why isn't it an error? 
I don't know the cause because it's not an error code and error message. 
Could you show me the correct JSON? I can get access token via curl, but 
can I really use curl with other requests?

I don't know what to do...


2019年5月31日金曜日 5時03分36秒 UTC+9 adsapiforumadvisor:
>
> Hello,
>
> Looks like you are missing the required parameters while creating the 
> campaigns. The date should be YYYYMMDD format, the status should be 
> PAUSED, campaign_budget and bidding_strategy_type fields also required to 
> create the campaign 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.resources#campaign>.
>  
> The complete example to create campaigns via CURL is not yet available. I 
> will let my team know regarding your concern and update you once I have 
> more information. Meanwhile you could refer the code samples here 
> <https://developers.google.com/google-ads/api/docs/samples/add-campaigns> 
> and follow the patterns.
>
> Regards,
> Sai Teja, Google Ads API team
>
> ref:_00D1U1174p._5001UBe6ec: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/3c062c52-16e9-4e6e-a1af-8bf7bdcab0d2%40googlegroups.com.

Reply via email to