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 as follows. No OAuth 2.0 is required for apps that are running in the developer sandbox.
- Go to the Google Developers Console .
Create a new project
by clicking Create Project:
- In the Project name field, type in a name for your project.
- In the Project ID field, optionally type in a project ID for your project or use the one that the console has created for you. This ID must be unique world-wide.
- Click the Create button and wait for the project to be created.
- Click on the new project name in the list to start editing the project.
- In the left sidebar, select the APIs item below "APIs & auth". A list of Google web services appears.
- Find the Google+ Hangouts API service and set its status to ON—notice that this action moves the service to the top of the list. You can turn off the Google Cloud services if you don't need them. Enable any other APIs that your app requires.
In the sidebar under "APIs & auth", select Consent screen.
- Choose an Email Address and specify a Product Name.
To the right of the Google+ Hangouts API service name,
click on 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. Click Save.