Hi Dino,

What account are you using for OAuth2 credentials? 
Presumably it's because you are using your client account's credential (not 
an MCC's one). 

Can you please try creating the new API project from your MCC account?
Also, please make sure you are not specifying (or you are specifying your 
MCC account's) clientCustomerId when you are using your MCC's OAuth2 
credential. 

Best,
- Takeshi, AdWords API Team

On Monday, April 1, 2013 3:00:33 PM UTC+9, Dino Kečo wrote:
>
> Hi,
>
> I'm using v201302 version of PHP client library for AdWords API and I have 
> small issue with ManagedCustomerService and get method. 
>
> When I'm using oAuth2 auth method I get only one result from API while 
> when I use deprecated Client ID auth I get all accounts which are managed 
> by MCC. I'm using MCC account to log in to API 
>
> My code for oAuth2 auth:
>
> $oauth2Info = array('client_id' => "",
>   'client_secret' => "",
>   'refresh_token' => "");
>
> $user = new AdWordsUser();
> $user->SetOAuth2Info($oauth2Info);
> $user->SetDeveloperToken("");
>
> $service = $user->GetService("ManagedCustomerService", "v201302");
> $selector = new Selector();
> $selector->fields = array('CustomerId', 'Login');
> $response = $service->get($selector);
> print_r($response);
>
> My code for ClientID auth:
>
> $user = new AdWordsUser();
> $user->SetEmail('');
> $user->SetPassword('');
> $user->SetDeveloperToken('');
>
> $service = $user->GetService("ManagedCustomerService", "v201302");
> $selector = new Selector();
> $selector->fields = array('CustomerId', 'Login');
> $response = $service->get($selector);
> print_r($response);
>
> Can someone please explain to me what is wrong with my code for oAuth2 
> auth and how can I fix this issue ?
>
> Regards,
> Dino
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.


Reply via email to