Add Campaign to a Customer

36 views
Skip to first unread message

Dũng Dương

unread,
Dec 17, 2021, 8:55:51 PM12/17/21
to AdWords API and Google Ads API Forum
Hi there,
I'm new to Google Ads API and I'm using PHP Library.
I use Create Customer to create new customer (customer A) under my MCC test account. How can I add Campaign to that customer A?
Thank you so much!

Google Ads API Forum Advisor

unread,
Dec 20, 2021, 4:05:42 AM12/20/21
to dungduo...@gmail.com, adwor...@googlegroups.com
Hi Dũng,

Thank you for posting your concern.

You may note first the customer ID of the Google Ads account created by the Create Customer sample code. Then, find the line of code provided below in this sample code, set the customer ID of the Google Ads account there and execute the sample code.
private const CUSTOMER_ID = 'INSERT_CUSTOMER_ID_HERE';

Let me know if you have further questions.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2TNOU2:ref

Dũng Dương

unread,
Dec 20, 2021, 4:10:02 AM12/20/21
to AdWords API and Google Ads API Forum

I did the same thing that you said but it didnt work. The new customer A account is not accessable, I think.
I got an error:  Request with ID 'JiFA9VnSIlHbOXjqHK_yyA' has failed. Google Ads failure details: authorization_error: 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
Vào lúc 16:05:42 UTC+7 ngày Thứ Hai, 20 tháng 12, 2021, adsapi đã viết:

Google Ads API Forum Advisor

unread,
Dec 20, 2021, 2:20:34 PM12/20/21
to dungduo...@gmail.com, adwor...@googlegroups.com
Hi Dũng,

I work with Ernie and will assist you. You can put your login-customerId in google_ads_php.ini file as described here -https://developers.google.com/google-ads/api/docs/client-libs/php/configuration#configuration_file. Feel free to get back to us.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2TNOU2:ref
Reply all
Reply to author
Forward
0 new messages