Thanks Peter for quick replay,

Below are sequence of event happened in between me and campaign manager of 
our adwords accounts. 

1) We tested few google adwords APIs using our test account with the 
credentials  we created our self and all are working fine. 
2) Then  we requested campaign manager of adwords accounts (third party 
vendor) to provide client id , client secret, developer token and refresh 
token (token for one of our customerclientID)to connect to production 
accounts which they are maintaining on behalf of us. 
3) I used above details and try to get access token  to use for other api 
operations.
4) Next day they came back(third party vendor) and told that we locked 
their all accounts. 

I just used below code to test the credentials which they provided. I just 
want to know is it possible to lock all accounts if I test like above.If 
possible what is the exact reason behind it so that we will not do that 
next time.  

If my code is not causing this then is there any chance that you can tell 
what could be the reason or other possible reasons to lock all their 
adwords accounts which they are maintaining. 

@Override
public AdWordsSession generateAdwordsSession(final Properties prop) {

String dpTokenUrl = (String) prop.getProperty(DP_TOKEN_URL);
Credential oAuth2Credential = new GoogleCredential();
try {
oAuth2Credential = new 
OfflineCredentials.Builder().forApi(Api.ADWORDS).withTokenUrlServer(dpTokenUrl).fromFile().build()
.generateCredential();
return new 
AdWordsSession.Builder().fromFile().withOAuth2Credential(oAuth2Credential).build();
} catch ( ValidationException | ConfigurationLoadException e) {
LOGGER.error("Error in getting AdwordsSession with given credentials", e);
return null;
} catch (Exception e) {
LOGGER.error("Exception in getting AdwordsSession with given credentials", 
e);
return null;
}

}



Thanks!
Hari. 





Thanks!
Hari.

On Friday, November 3, 2017 at 2:07:06 PM UTC+5:30, Peter Oliquino wrote:
>
> Hi Hari,
>
> Refresh tokens and the rest of the credentials should be created using an 
> email address that has access to a specific client account. For simplicity, 
> if you wish to be able to use only a single set of OAuth2 credentials, I 
> would recommend that you identify an email address which has access to your 
> Root MCC account and while logged in to the said email address, you may 
> then generate the OAuth2 credentials 
> <https://developers.google.com/adwords/api/docs/guides/authentication> 
> (refreshToken, 
> clientId and clientSecret).
>
> This will allow you to automatically have access to all other sub accounts 
> under the said MCC. I hope this has been helpful and feel free to write 
> back for any follow ups.
>
> Thanks and regards,
> Peter
> AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/37df056a-58bb-4cfa-8e4d-35224f114942%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to