Unable to create campaign from test manager account

250 views
Skip to first unread message

Libsys Limited

unread,
Feb 23, 2022, 6:22:55 AM2/23/22
to Google Ads API and AdWords API Forum

I have created a test manager account for testing api with developer token, but I am not able to create any campaigns under it. To create campaign I first need to create a test client account, but I'm not able to do so. Facing some issue in it. It is being shown that client has been created, but it is not shown on the screen. I have tried creating test client account even with api. The issue is same.


I have been referring to https://developers.google.com/google-ads/api/docs/first-call/overview#test_account

Screenshot from 2022-02-23 16-32-24.png

Google Ads API Forum Advisor

unread,
Feb 23, 2022, 3:46:32 PM2/23/22
to lsne...@gmail.com, adwor...@googlegroups.com
Hi Libsys,

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

With regards to your concern, The test account does not include the billing information. However, you still could create the test client account under the test manager account. All the test client accounts are invisible by default. To be able to see the test client accounts under the test manager account, you would need to click on the down arrow next to the test manager account number and then on the drop-down list click on the three vertical dots icon and select cancelled accounts. If you still have issues creating the test client account, please refer to this code example and create the test client account via the API.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2WyJ3q:ref

Libsys Limited

unread,
Feb 24, 2022, 1:48:10 AM2/24/22
to Google Ads API and AdWords API Forum
I have now created a campaign from test account, but not able to fetch it through getCampaigns.java
If I am sending customer id as the test manager account, the list returned is empty.
If I am sending the test client account id,  I am getting this error.

Response
--------
Headers: Metadata(content-type=application/grpc,request-id=9O3qGW-bDPaAhqEhYwKixQ,date=Thu, 24 Feb 2022 06:43:43 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")
Body: null
Failure message: errors {
  error_code {
    authorization_error: USER_PERMISSION_DENIED
  }
  message: "User doesn\'t have permission to access customer. Note: If you\'re accessing a client customer, the manager\'s customer id must be set in the \'login-customer-id\' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid"
}
request_id: "9O3qGW-bDPaAhqEhYwKixQ"

Google Ads API Forum Advisor

unread,
Feb 24, 2022, 2:35:08 PM2/24/22
to lsne...@gmail.com, adwor...@googlegroups.com
Hi Libsys,

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

With regards to your concern, you’ve encountered ‘USER_PERMISSION_DENIED' error. The ‘USER_PERMISSION_DENIED’ usually occurs due to incorrectly setting the 'login-customer-id’ in the request or not specifying login-customer-id in the request. Note that when a user doesn't have permission to access a customer and you’re accessing a client customer then the manager's customer ID must be set in the 'login-customer-id’ in the header request.

To resolve this, you will need to ensure that your OAuth2 credentials were generated while logged in as the user / email address that has access to the customer ID in your request. Also, if the said user / email address is one that has access to the MCC / manager of the customer account, then you may specify the MCC / manager account's ID as the login-customer-id. Let me know if you have any question.
Reply all
Reply to author
Forward
0 new messages