Hi Peter,

It depends to what operation are you trying to perform, only certain 
operations are allowed at the MCC level. In general for campaign management 
calls you should .setClientCustomerId to a client account.

Best,

- David Torres - AdWords API Team

On Wednesday, July 17, 2013 3:07:15 PM UTC-4, Peter Kingswell wrote:
>
> Hi,
>
> we are switching our AdWords API access from Client Login to OAuth2 as 
> part of our migration to v201306. The piece of code we're using to create a 
> session to access an MCC customer's account is:
>
> Credential oAuth2Credential = new 
> OfflineCredentials.Builder().forApi(Api.ADWORDS).fromFile().build().generateCredential();
> AdWordsSession session =  new 
> AdWordsSession.Builder().fromFile().withOAuth2Credential(oAuth2Credential).build();
> session.setClientCustomerId("123456789");
>
> where customer 123456789 is one of our MCC customer accounts.
>
> And our ads.properties contains:
>
> api.adwords.clientCustomerId=xxx
> api.adwords.clientId=xxx
> api.adwords.clientSecret=xxx
> api.adwords.userAgent=PricingEngine
> api.adwords.developerToken=xxx
> api.adwords.isPartialFailure=false
> api.adwords.returnMoneyInMicros=true
> api.adwords.refreshToken=xxx
>
> The code above executes without throwing. However when we try to use the 
> session to retrieve the customer's campaigns an 
> AuthorizationError.USER_PERMISSION_DENIED is thrown. According to the 
> documentation this means "User doesn't have permission to access customer." 
> however since it's an MCC account we should have permission implicitly.
>
> I am a bit stumped as to how to investigate this further. Can anyone spot 
> anything wrong with the session-building code or something missing in our 
> ads.properties?
>
> Thanks in advance,
> Peter
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to