To launch your bot on Hangouts chat, you must:
- Enable Hangouts Chat API
- Create a Service Account
- Set Up the Integration.
Enable Hangouts Chat API
- Log in to Google Developer Console.
- Click Enable APIs and Services.
- Search and select Hangouts Chat API.
- Click Enable.
- On enabling the API, you are redirected to the Overview page of the Hangouts Chat API.
Set Up API Configurations
- Go to the Configurations section from the left pane and provide all the required details like:
- Bot name
- Avatar URL
- Description
- Under Functionality choose both Bot works in direct messages and Bot works in rooms options.
- Under Connection Settings:
- Select the Bot URL option.
- Enter the Webhook URL provided by Kore.ai from the Configurations tab of the channel setup page.
- Select the appropriate option under Permissions.
- Copy the verification token and enter it in the Verification Token field present in the Configurations tab of the Hangouts channel setup page of the Bot Builder.
Create a Service Account
You must set up the credentials to facilitate the integration.
- From the Credentials page, click Create credentials and select the Service account key.
- From the Service account drop-down list, select the New service account option.
- Enter a name for your service account.
- Select Key type as JSON, and click Create.
- After the creation, a JSON file containing the credentials is downloaded to your computer.
- From the downloaded file, capture client_email and private_key values and provide them in the Configurations tab of the Hangouts channel setup page of the Bot Builder.
Complete the Hangouts Chat Configuration from the bots platform and publish the bot to access the bot from Hangouts.