title: Google Cloud KMS error - This API is not acessible from your region. (HTTP status - 403)
body: <p>I have created a google cloud project and enabled <strong>Google Cloud Key Management Service (KMS) API</strong>. I have created two keyrings. <code>keyring1</code> is located in <code>us-east1</code> and <code>keyring2</code> is located in <code>global</code>. I have created the following java program to list the keyrings in the region:</p>
  
  <pre><code>GoogleCredential credential = GoogleCredential.getApplicationDefault();
  credential = credential.createScoped(CloudKMSScopes.all());
  
  String keyRingPath = "projects/&lt;&lt;projectId&gt;&gt;/locations/global";
  
  CloudKMS kms = new CloudKMS.Builder(httpTransport, jsonFactory, credential).setApplicationName("CloudKMS snippets").build();
  
  ListKeyRingsResponse response = kms.projects().locations().keyRings().list(keyRingPath).execute();
  
  System.out.println(response.getKeyRings());
  </code></pre>
  
  <p>I am getting following <strong>forbidden</strong> error:</p>
  
  <pre><code>Exception in thread "main" com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
  {
    "code" : 403,
    "errors" : [ {
      "domain" : "global",
      "message" : "This API is not acessible from your region.",
      "reason" : "forbidden"
    } ],
    "message" : "This API is not acessible from your region.",
    "status" : "PERMISSION_DENIED"
  }
  </code></pre>