Configure a Developer Project and Account Settings

Configure a Google Developer Project

A Google Developer Project gives your device access to the Google Assistant API. The project tracks quota usage and gives you valuable metrics for the requests made from your device.

To enable access to the Google Assistant API, do the following on your development machine:

  1. In the Cloud Platform Console, go to the Projects page. Select an existing project or create a new project.

    Go to the Projects Page

  2. Enable the Google Assistant API on the project you selected (see the Terms of Service).

    Enable the API

    Click Enable.

  3. Create an OAuth Client ID with the following steps:

    1. Create the client ID.
      Create an OAuth Client ID

    2. You may need to set a product name for the product consent screen. On the OAuth consent screen tab, give the product a name and click Save.

    3. Click Other and give the client ID a name.

    4. Click Create. A dialog box appears that shows you a client ID and secret. (No need to remember or save this, just close the dialog.)

    5. Click (at the far right of screen) for the client ID to download the client secret JSON file (client_secret_<client-id>.json).

  4. Copy the client_secret_<client-id>.json file from your development machine to your device. This step is not necessary if you downloaded this file directly to your device.

    In a later step, you will use this file to authorize the Google Assistant SDK sample to make Google Assistant queries.

    For the Raspberry Pi only:

    Open a new terminal window. Run the following command in this new terminal:

    scp ~/Downloads/client_secret_client-id.json pi@raspberry-pi-ip-address:/home/pi/

    password: password-for-device

    Close this terminal window.

Set activity controls for your account

In order to use the Google Assistant, you must share certain activity data with Google. The Google Assistant needs this data to function properly; this is not specific to the SDK.

Open the Activity Controls page for the Google account that you want to use with the Assistant. You can use any Google account, it does not need to be your developer account.

Ensure the following toggle switches are enabled (blue):

  • Web & App Activity
    • In addition, be sure to select the Include Chrome browsing history and activity from websites and apps that use Google services checkbox.
  • Device Information
  • Voice & Audio Activity