title: Post Request from GAE to FCM fails at getAccessToken()
body: <p>I have the following code to get the access token to be used later on for a POST request to FCM. The following code works immediately after deployment, and fails after awhile.</p>
  
  <pre><code>FileInputStream serviceAccountCreds= new FileInputStream("path/to/serviceAccountKey.json");
          HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();
          JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
          GoogleCredential credential = GoogleCredential
                  .fromStream(serviceAccountCreds, httpTransport, jsonFactory)
                  .createScoped(Arrays.asList(FIREBASE_SCOPE));
          credential.refreshToken();
          return credential.getAccessToken();
  </code></pre>
  
  <p>The stack trace is as follow:</p>
  
  <pre><code>java.net.UnknownHostException: accounts.google.com
  at java.net.AbstractPlainSocketImpl.connect (AbstractPlainSocketImpl.java:184)
  at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:392)
  at java.net.Socket.connect (Socket.java:589)
  at sun.security.ssl.SSLSocketImpl.connect (SSLSocketImpl.java:668)
  at sun.net.NetworkClient.doConnect (NetworkClient.java:175)
  at sun.net.www.http.HttpClient.openServer (HttpClient.java:432)
  at sun.net.www.http.HttpClient.openServer (HttpClient.java:527)
  at sun.net.www.protocol.https.HttpsClient.&lt;init&gt; (HttpsClient.java:264)
  at sun.net.www.protocol.https.HttpsClient.New (HttpsClient.java:367)
  at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient (AbstractDelegateHttpsURLConnection.java:191)
  at sun.net.www.protocol.http.HttpURLConnection.plainConnect0 (HttpURLConnection.java:1138)
  at sun.net.www.protocol.http.HttpURLConnection.plainConnect (HttpURLConnection.java:1032)
  at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect (AbstractDelegateHttpsURLConnection.java:177)
  at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0 (HttpURLConnection.java:1316)
  at sun.net.www.protocol.http.HttpURLConnection.getOutputStream (HttpURLConnection.java:1291)
  at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream (HttpsURLConnectionImpl.java:250)
  at com.google.api.client.http.javanet.NetHttpRequest.execute (NetHttpRequest.java:77)
  at com.google.api.client.http.HttpRequest.execute (HttpRequest.java:972)
  at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed (TokenRequest.java:283)
  at com.google.api.client.auth.oauth2.TokenRequest.execute (TokenRequest.java:307)
  at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken (GoogleCredential.java:384)
  </code></pre>
  
  <p>...</p>
  
  <p>The code is executed in a Google App Engine application, so is it possible that GoogleCredential is not able to make HTTPRequest? (I recall reading something along this lines in GAE's documentation). If so, what would the correct HTTP Transport to use here?</p>