Hi,
What account did you use when you authenticated the application?
And please make sure you don't explicitly pass clientCustomerId through a
config file or the code.
FYI : You don't have to pass Selector to CustomerService.get()
Best,
- Takeshi, AdWords API Team
On Thursday, August 29, 2013 10:52:51 PM UTC+9, larisa bolgova wrote:
>
> Hi.
> I can't get clientCustomerId when user authorized throught OAUth2. I
> recieved clientCustomerId of my MCC test account, not a user that is
> authorized.
> This is a part of code where i trying to get clientCustomerId. Could you
> help me, where i did wrong.
>
> $client = new Google_Client();
> $client->setApplicationName(Settings::get('BrandName'));
> $client->setClientId('446749605635-****');
> $client->setClientSecret('**********************');
> $client->setRedirectUri('my_url');
> $client->setDeveloperKey('*********************');
> $client->setScopes('https://adwords.google.com/api/adwords/');
> $client->authenticate();
>
> $arrResponse = Zend_Json::decode($client->getAccessToken());
> $user = new AdWordsUser();
> $customerService = $user->GetService('CustomerService', 'v201306');
> $selector = new Selector();
> $selector->fields = array('clientCustomerId');
> $page = $customerService->get($selector);
> var_dump($page);
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.