The Hangouts API enables you to develop collaborative apps that run inside of a Google+ Hangout. You can write your app as either a Hangout application or extension. The example below is written as an application.
The following steps show you how to quickly host and run a pre-built simple Hangout app. It shows you how you can first run it privately before running it publicly.
1. Download and host the Simple Hangout App
The Simple Hangout App is a quick way to get a demo Hangout app up and running. It is one of our sample apps.
- Download the simpleHangoutApp.xml file to any directory on your local drive. This file is the only file that you need from the zip file.
- Host the XML file on a server so it is publicly available. The server should have no firewalls and require no login authentication to access this file.
The next steps show how to run this simple app in a Hangout.
2. Create a Google Developers Console project
Before you can use the Google+ Hangouts API, you need to create a project in the Google Developers Console, and enable and configure the API, as follows. OAuth 2.0 is not required for apps that are running in the developer sandbox.
- Go to the Google Developers Console .
- Create a new project : from the project drop-down, select Create a new project.
Enable the Google+ Hangouts API service:
- In the list of Google APIs, search for the Google+ Hangouts API service.
- Select Google+ Hangouts API from the results list.
- Press the Enable API button. Wait for the API to be enabled.
In the sidebar under "API Manager", select Credentials, then select
the OAuth consent screen tab.
- Choose an Email Address, specify a Product Name, and press Save.
Configure the API:
- In the left sidebar, select API Manager and then select the Enabled APIs tab.
- To the right of the Google+ Hangouts API service name, press the gear icon .
- In the Application URL field, enter the URL where you published
your Hangout gadget XML file from Step 1.
If you skipped Step 1 above, you can instead enter this URL where
Google already hosts a public example XML file:
- Fill out other information requested on that page.
- Press Save.