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.