Using curl to create google ad campaign fails with Internal_Server_Error

412 views
Skip to first unread message

Anushri shanbhag

unread,
May 17, 2019, 6:51:14 AM5/17/19
to AdWords API and Google Ads API Forum
I have followed steps as mentioned in  https://developers.google.com/google-ads/api/docs/concepts/curl-example.  I tried the campaignBudgets:mutate as mentioned in the link with exactly the same json, but that too isn't working .

Then I tried the following to  create campaign, by using  "campaigns:mutate"  with following json body

{
    "operations": [
        {
            "create": {
                "name": "NewCampaign1",
                "status": "UNSPECIFIED",
                "advertising_channel_type":"DISPLAY",
                "serving_status"   : "UNSPECIFIED",
                "ad_serving_optimization_status":"UNSPECIFIED",
                "real_time_bidding_setting": {
                "opt_in" : "false"
                },
                "network_settings" : {
                "target_google_search" : "true",
                "target_search_network": "true",
                "target_content_network":"false",
                "target_partner_search_network":"false"
                },
                "campaign_budget" : "10000",
                "bidding_strategy_type":"MANUAL_CPM",
                "start_date" : "06/06/2019",
                "end_date"   : "07/07/2019"
                
           }
        }
    ]
}

However I get 500 internal server error.   I wanted to know what is going wrong .Can anyone please help.

googleadsapi...@google.com

unread,
May 20, 2019, 12:36:43 AM5/20/19
to AdWords API and Google Ads API Forum
Hi,

Thank you for reaching out. However, to further investigate this, could you provide the complete JSON request and response logs when you encountered the error? If you haven't enabled logging yet, you may refer to the README section of your client library for detailed instructions on how to enable it. Please use the reply privately to author option.

Regards,
Dave
Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/b88c20cc-0c0e-42d5-90db-9aaa58a66b02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Google Ads API Forum Advisor Prod

unread,
May 20, 2019, 4:30:19 AM5/20/19
to adwor...@googlegroups.com

Hi,

You are seeing this error is because you might haven't set the login-customer-id in the requests header. Could you confirm if you already set the login-customer-id in the requests header to match the manager you are logging in as? If this header is not set, you will begin seeing the error: USER_PERMISSION_DENIED. You may refer to this blog post for more information about the new required header for Google Ads API requests.

Feel free to write back if the error persists after setting this.



Regards,
Dave
Google Ads API Team



ref:_00D1U1174p._5001UAq7Vc:ref

Google Ads API Forum Advisor Prod

unread,
May 20, 2019, 6:40:09 AM5/20/19
to adwor...@googlegroups.com
Hi,

The CREATE_OPERATION_NOT_PERMITTED is related to access issue and occurs if there is an unauthorized create operation that invokes a service's mutate method. Could you confirm if the account that you used for generating the OAuth2 credentials has standard or administrative access? To know more about the access levels, you may refer to this guide.

Anushri shanbhag

unread,
May 20, 2019, 1:05:40 PM5/20/19
to AdWords API and Google Ads API Forum
Hi,

I will check this out and get back.

Thanks and Regards,
Anushri
Reply all
Reply to author
Forward
0 new messages