Ruby, OAuth, and Chrome Web Store

The Chrome Web Store, launching by the end of 2010, integrates a streamlined payment system, powered by Google Checkout. Your apps can opt-in to use this payment system for quick and easy payments. You can check if a user has paid for the application with a call to the Chrome Web Store License API.

The License API is a REST service which returns a simple JSON format, indicating if a user (identified by a Google Federated OpenID URL) can access your web app.

For Ruby developers, a new OAuth library, Signet, has recently been released which makes signing your OAuth request to the License API very easy.

The first step is to publish a paid web app to the Chrome Web Store. I've written a Quick Start Guide for the Chrome Web Store that will make this fast and easy. Once you configure your app as paid, either via a one time payment or a monthly or yearly subscription, you will be provided with an OAuth Token and Token Secret.

The second step is to install the Signet gem, as simple as gem install signet

Here is the sample code:



An example JSON response:



Our initial set of Chrome Web Store Best Practices should also help you get started.

Looking forward to your web app in the store!

Popular posts from this blog

Lists and arrays in Dart

Converting Array to List in Scala

Null-aware operators in Dart