diff --git a/packages/google-cloud-translate/README.md b/packages/google-cloud-translate/README.md index 04c94742fe7..62eae7cc405 100644 --- a/packages/google-cloud-translate/README.md +++ b/packages/google-cloud-translate/README.md @@ -86,8 +86,10 @@ If you are not running this client on Google Compute Engine, you need a Google D 3. Navigate to **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services): * Google Translate API 4. Navigate to **APIs & auth** > **Credentials** and then: - * If you want to use a new service account, click on **Create new Client ID** and select **Service account**. After the account is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. - * If you want to generate a new key for an existing service account, click on **Generate new JSON key** and download the JSON key file. + * If you want to use a new service account key, click on **Create credentials** and select **Service account key**. After the account key is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. + * If you want to generate a new service account key for an existing service account, click on **Generate new JSON key** and download the JSON key file. + * If you want to use an API key, click on **Create credentials** and select **API key**. After the API key is created, you will see a newly opened modal with the API key in a field named **Your API key** that the library uses to authenticate your requests. + * If you want to generate a new API key for an existing API key, click on an existing API key and click **Regenerate key**. ``` js var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' @@ -100,6 +102,9 @@ var translate = require('@google-cloud/translate')({ // Or the contents of the key file: credentials: require('./path/to/keyfile.json') + + // Your API key (if not using a service account JSON file): + key: '...' }); // ...you're good to go!