Hi,

Unfortunately, we don't have PHP sample codes for that page yet.

But the error CLIENT_CUSTOMER_ID_IS_REQUIRED 
<https://developers.google.com/adwords/api/docs/reference/v201502/ManagedCustomerService.AuthenticationError.Reason>
 
signals that you haven't set up the *clientCustomerId* properly.
How did you set your auth.ini file?
With that setting, can you run very simple example like GetCampaigns.php 
<https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201506/BasicOperations/GetCampaigns.php>
 
of any of your child accounts?

Cheers,
Thanet, AdWords API Team

On Thursday, September 3, 2015 at 4:00:56 AM UTC+9, psc...@gmail.com wrote:
>
> (posting from my Production Acct) 
>
> I am getting this error: An error has occurred: 
> [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; trigger:'<null>']
>
> I believe this is because I am calling this function on a top level MCC 
> account. I have many client accounts under this and they each have their 
> own campaigns. How would I go about this. I have read this 
> <https://developers.google.com/adwords/api/docs/guides/managing-accounts>but 
> I'm getting a little lost. Also, the snippet code that is provided to link 
> Clients to MCC accounts is in Java and I need it in PHP.
>
> On Wednesday, September 2, 2015 at 12:02:22 PM UTC-4, Thanet Knack 
> Praneenararat (AdWords API Team) wrote:
>>
>> Hi,
>>
>> First, I highly recommend to read the guide from our official website 
>> <https://developers.google.com/adwords/api/> instead of third-party 
>> website.
>> First-request guide 
>> <https://developers.google.com/adwords/api/docs/first-request>, get 
>> started guide 
>> <https://developers.google.com/adwords/api/docs/guides/start>, and getting 
>> started section 
>> <https://github.com/googleads/googleads-php-lib#getting-started> of php 
>> client lib README might be very useful to you for getting started.
>>
>> Basically, after you put all information in the auth.ini 
>> <https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/AdWords/auth.ini>,
>>  
>> you should be able to run GetCampaigns.php 
>> <https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201506/BasicOperations/GetCampaigns.php>
>>  
>> example without adding any more codes.
>> So, the below line is not necessary.
>>
>>> After the "require" line, I added this code from the auth.ini regarding 
>>> the client account:
>>> $user = new AdWordsUser();
>>> $user->SetClientCustomerId("xxxxxxxxxx");
>>
>>
>> Please try the client lib as is before you copy files around to your 
>> project directories.
>>
>> Cheers,
>> Thanet, AdWords API Team
>>
>> On Wednesday, September 2, 2015 at 10:01:31 PM UTC+9, devp...@gmail.com 
>> wrote:
>>>
>>> Alright, so I got approved and I followed the example. Literally copy 
>>> and pasted it. After the "require" line, I added this code from the 
>>> auth.ini regarding the client account:
>>>
>>> $user = new AdWordsUser();
>>> $user->SetClientCustomerId("xxxxxxxxxx");
>>>
>>> With credentials filled in.
>>>
>>> Now, is this the right way to go about this? I'm running it in command 
>>> prompt and it's not finding the "init.php" file immediately. Do I have to 
>>> point to it specifically? Or is there a general php method that can 
>>> recursively check children folders for this file? Also, from what I'm 
>>> seeing there are only init.php files in the Examples folders.
>>>
>>>
>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7037b6cc-9065-4ea1-8be2-451a0e873618%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to