title: Missing a valid API key about Google Translation API Client issue?
body: <p>I follow the <a href="https://cloud.google.com/translate/docs/reference/libraries#client-libraries-usage-java" rel="nofollow noreferrer">https://cloud.google.com/translate/docs/reference/libraries#client-libraries-usage-java</a> to get started java client demo.
  I have already <code>set</code> <strong>authentication json</strong> file to the environment variable <code>GOOGLE_APPLICATION_CREDENTIALS</code>. However, I got the translateException when I run java sample code.</p>
  
  <pre><code>Exception in thread "main" com.google.cloud.translate.TranslateException: The request is missing a valid API key.
  at com.google.cloud.translate.spi.v2.HttpTranslateRpc.translate(HttpTranslateRpc.java:61)
  at com.google.cloud.translate.spi.v2.HttpTranslateRpc.translate(HttpTranslateRpc.java:144)
  at com.google.cloud.translate.TranslateImpl$4.call(TranslateImpl.java:113)
  at com.google.cloud.translate.TranslateImpl$4.call(TranslateImpl.java:110)
  Caused by: 
  com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 
  Forbidden
  {
    "code" : 403,
    "errors" : [ {
    "domain" : "global",
    "message" : "The request is missing a valid API key.",
    "reason" : "forbidden"
  } ],
    "message" : "The request is missing a valid API key.",
    "status" : "PERMISSION_DENIED"
  }
  </code></pre>
  
  <p>The doc shows that this JSON file contains key infomation.</p>
  
  <p>The sample code is shown </p>
  
  <pre><code>    // Instantiates a client
      Translate translate = TranslateOptions.getDefaultInstance().getService();
      // The text to translate
      String text = "Hello, world!";
      // Translates some text into Russian
      Translation translation =
          translate.translate(
              text,
              TranslateOption.sourceLanguage("en"),
              TranslateOption.targetLanguage("ru"));
      System.out.printf("Text: %s%n", text);
      System.out.printf("Translation: %s%n", translation.getTranslatedText());
  </code></pre>
  
  <p>I have no idea how to set api-key.
  It still doesn't work after I set environment variable for <code>key</code> and <code>credentials</code>. </p>
  
  <p><a href="https://i.stack.imgur.com/5O6fH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5O6fH.png" alt="enter image description here"></a></p>