Cannot create campaign in test account

334 views
Skip to first unread message

Ryan Marks

unread,
Dec 15, 2023, 12:11:29 PM12/15/23
to Google Ads API and AdWords API Forum
Following the instructions at https://developers.google.com/google-ads/api/docs/best-practices/test-accounts

I have created a Test Manager and Test Client, but I'm not able to create a campaign in the Test Client account.

Has anyone else had any luck?

gads-cant-creaate-test-campaign.png

Google Ads API Forum Advisor

unread,
Dec 15, 2023, 2:36:32 PM12/15/23
to ryan....@therecruitlab.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you have an issue regarding creating a campaign in the test account. Could you please confirm if you are creating campaigns using the Google Ads API or the Google Ads UI?

If you are using the Google Ads API, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end and uncropped UI screenshot of the Google Ads account where you are facing the issue.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02r24Bw:ref"

Thanks,
 
Google Logo Google Ads API Team

 

Ryan Marks

unread,
Jan 10, 2024, 5:40:25 PM1/10/24
to Google Ads API and AdWords API Forum
I was attempting to create the campaign using the Google Ads UI.

Ryan

Google Ads API Forum Advisor

unread,
Jan 10, 2024, 6:41:59 PM1/10/24
to ryan....@therecruitlab.com, adwor...@googlegroups.com
Hi Ryan,

Thank you for getting back to us.

I understand that you are trying to create the campaign using the Google Ads UI.  I would suggest you to refer to this article to know more about how to Create your campaign.

Since ads related issues are handled by the Google Ads Product support team, I would recommend reaching out to the Google Ads Product support team as they are better equipped to address your concern. Please note that our team can only assist with the technical queries or concerns related to the Google Ads API.

Ryan Marks

unread,
Jan 11, 2024, 12:36:00 PM1/11/24
to Google Ads API and AdWords API Forum
We testing using just the API.  Here is the requested information.

Request
----------
Method:
POST

URL:
https://googleads.googleapis.com/v15/customers/7003624531/campaignBudgets:mutate

Body:
{
  "operations": [
    {
      "create": {
          "name": "Campaign Budget Test 1",
          "amountMicros": "10000",
          "type": "STANDARD"
      }
    }
  ],
  "partialFailure": true,
  "validateOnly": true,
  "responseContentType": "MUTABLE_RESOURCE"
}

RequestId:
eCx_XuKYAn83f1zEIoJ8Gw

Headers:

developer-token: 
******redacted******

Content-Type: 
application/json

Authorization:
Bearer ******redacted******

User-Agent: 
PostmanRuntime/7.36.0

Accept: 
*/*

Cache-Control: 
no-cache

Postman-Token: 
******redacted******

Host: 
googleads.googleapis.com

Accept-Encoding: 
gzip, deflate, br

Connection: 
keep-alive

Content-Length: 
266



Response
------------
{
    "partialFailureError": {
        "code": 3,
        "message": "The operation is not allowed for the given context., at operations[0]",
        "details": [
            {
                "@type": "type.googleapis.com/google.ads.googleads.v15.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "contextError": "OPERATION_NOT_PERMITTED_FOR_CONTEXT"
                        },
                        "message": "The operation is not allowed for the given context.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                }
                            ]
                        }
                    }
                ],
                "requestId": "eCx_XuKYAn83f1zEIoJ8Gw"
            }
        ]
    }
}

Test Account Number: 7003624531

GAds Account 7003624531.png

Thank you,
Ryan


Google Ads API Forum Advisor

unread,
Jan 11, 2024, 6:12:22 PM1/11/24
to ryan....@therecruitlab.com, adwor...@googlegroups.com
Hi,


Thank you for getting back to us.

Upon checking the provided logs, I could see that you are getting the error "OPERATION_NOT_PERMITTED_FOR_CONTEXT". Please note that creating a campaign budget should be done on a client account only and not on a manager account and this is the reason why you are getting the said error. With this, please try creating a campaign on the client account. I hope it helps and let me know what goes after.
Reply all
Reply to author
Forward
0 new messages