0

When I try to invoke the Gmail APIs to test email automation from my machine it works absolutely fine. However, if I run the same automation from within the client network I am getting an exception saying

"javax.net.ssl.SSLException: Software caused connection abort: recv failed".

I am calling the GMAIL APIs in my java program using this google-api-client library like this-

GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(
        HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)
        .setDataStoreFactory(new FileDataStoreFactory(new File(TOKENS_DIRECTORY_PATH)))
        .setAccessType("offline")
        .build();
LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(88xx).build();
return new AuthorizationCodeInstalledApp(flow, receiver).authorize("user")

As per the client's network team, they have enabled the firewall policies to allow the whitelisting of the google email APIs but the problem still persists.

If anybody can give me any pointers on what the problem could be, please let me know.

Thanks, Ashish

4

0 回答 0