googleads / googleads-java-lib

Google Ad Manager SOAP API Client Library for Java
Apache License 2.0
226 stars 360 forks source link

Google adwords credentials could not be refreshed. SSL handshake and configuration load exception #132

Closed Kimberlyclrk closed 6 years ago

Kimberlyclrk commented 6 years ago

Hi Team,

We are facing issue while connecting to google adwords api using java client. While accessing api, we are getting ssl handshake exception. we posted regarding this in forums, we got response like need to add the certificate to our java keystore. We have downloaded the certificate from browser and added to java keystore. After that,we are getting exception like configuration load exception. Very next day, we observed that adwords certificate is changed. so we have downloaded certificate and added to java keystore. same again configuration exception is happening. We have attached document which contains step by step execution. Could you please help us to solve issue. GoogleAdwordsApiCall.docx

jradcliff commented 6 years ago

Hi,

One thing I noticed from your doc is that it looks like you are naming your configuration file App.properties. This is leading to the ConfigurationLoadException because the library is looking for a file named ads.properties. It checks for the ads.properties file in multiple locations, in this order:

  1. in the current directory
  2. in the user home directory
  3. in the classpath

Please rename your file to ads.properties and place it in one of the locations above.

Regarding the certificate issue, have you spoken with your system administrator about this? Your individual application should not have to manage the keystore -- this is something that your sys admin should manage centrally.

Thanks, Josh, AdWords API Team

Kimberlyclrk commented 6 years ago

Thanks for the information. Now configuration load exception is not happening. errorssl We are able to get the refresh token. we have placed refresh token in ads.properties file and trying to get the data. while getting data we are getting issue like, ssl handshake exception. attached screenshot. From where we need to download the certificate? is there any process for this. Kindly help us to solve this issue.

jradcliff commented 6 years ago

Hi,

If you manually import the certificate, you'll have to import it again every time Google issues a new certificate. As you mentioned earlier, this can happen quite frequently.

Instead, I recommend speaking with your system administrator to find out why your certstore does not have a Certificate Authority (CA) that can verify certificates. For more details on CAs and certificate verification, check out this article. In particular, that article has some helpful command lines (using openssl) you can run to help determine where the certification process is failing.

Thanks, Josh, AdWords API Team

jradcliff commented 6 years ago

Hi,

Did you get a chance to discuss this with your sys admin, and if so, were they able to resolve the issue?

Thanks, Josh, AdWords API Team

jradcliff commented 6 years ago

Hi,

I haven't heard back on this in a while, so I'll close it out. Please reopen if you still have questions or comments.

Thanks, Josh, AdWords API Team