We are download statistics daily using ReportDownloader. But, since mid may this stopped working due to bad credentials it seems. We get USER_PERMISSION_DENIED for all our clientIds. We have not changed our authentication credentials at all, but one night this stopped working.
I asked AdWords support, but was eventually directed here. After searching and reading other questions and posting I realised that I should try verify using the getCustomers() for the AdWordsServices.
AdWordsSession session = createAdWordsSession(clientId, clientSecret, refreshToken, developerToken, userAgent);
AdWordsServicesInterface adWordsServices = AdWordsServices.getInstance();
CustomerServiceInterface service = adWordsServices.get(session, CustomerServiceInterface.class);
for (Customer customer : service.getCustomers()) {
System.out.printf(" %s%n", customer.getCustomerId());
}
But, I get AuthenticationError CUSTOMER_NOT_FOUND as fault. If I add the .withClientCustomerId() when I create the session I get USER_PERMISSION_DENIED as expected.
So, can help us to get the right credentials (this was setup four-five years ago and the knowledge has left the building :)). Is it here or calling our sales contact? Or is it the AdWords support?
Best regards,
Peter
Ps
This might be posted twice, but I could not find so I am posting a new question.
Ds.