Google APIs Console picks up the Picker API

September 06, 2013


Link copied to clipboard
Author PhotoBy Kuntal Loya, Software Engineer

With the Google Picker API, you can provide users of your application with a simple interface to select photos, maps, videos, documents and other content from Google using a few lines of JavaScript.

Starting today, the Picker API is available via the APIs Console. For those of you who are already using the API, this change makes it easier to manage and view traffic and authentication data alongside any other Google APIs that you may be using with your application.

To get started, register your project on the APIs Console. If you’re already using the Picker API, you’ll need to include the developer key you obtained during registration with the JavaScript used to create the picker.
<script type="text/javascript">

      // The API developer key obtained from the Google APIs Console.
      var developerKey = 'ABC123 ... ';

      // Use the API Loader script to load google.picker.
      function loadPicker() {
        gapi.load('picker', {'callback': createPicker});
      }

      // Create and render a Picker object for searching images.
      function createPicker() {
        var picker = new google.picker.PickerBuilder().
            addView(google.picker.ViewId.IMAGE_SEARCH).
            setDeveloperKey(developerKey).
            setCallback(pickerCallback).
            build();
        picker.setVisible(true);
      }
    </script>
    <script type="text/javascript" 
      src="https://apis.google.com/js/api.js?onload=loadPicker">
    </script>
See the Developer’s Guide for more details.


Kuntal Loya has been making the Google Picker smarter while enjoying Bangalore’s weather and the food at the Google CafĂ©. Meanwhile, she’s nearing the end of Mahasamar, Narendra Kohli’s 8-volume re-telling of the Mahabharata.

Posted by Scott Knaster, Editor