Web Quickstart

Complete the steps described in this page, and in about five minutes, you'll have the following three simple JavaScript applications that make requests to the Poly API:

Prerequisites

To run this quickstart, you'll need:

  • Python 2.4 or greater (to provide a web server).
  • Access to the internet and a web browser.
  • A Google account.

Get an API Key

Get an API key

  • If you aren't already signed in, you'll be asked to sign in with a Google account or create one.

  • In the dialog box, either select an existing API Console project or create a new project

  • Click Next to enable the Poly API and receive your API key. The API key is used to identify your app and enforce usage limits.

You can also create, view, and manage your projects, APIs, and API keys at the Google APIs Console.

Set up the sample

Download and extract the samples package.

In a text editor, open each of the sample applications (basic-sample.html, search-sample.html, and tiltbrush-sample.html) and enter your API key in the place shown below:

const API_KEY = '*** INSERT YOUR API KEY HERE ***';

Run the sample

Start the web server using the following command from your working directory:

PYTHON 2.X

python -m SimpleHTTPServer 8000

PYTHON 3.X

python -m http.server 8000

Launch the sample apps in your browser with these URLs: