Simple google picasa management
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Ruby library for Picasa Web Albums Data API

Note: Picasa service will retire: Moving on from Picasa


gem install picasa



client = "")
# => Picasa::Presenter::AlbumList"album_id")
# => Picasa::Presenter::Album"album_id", file_path: "path/to/my-photo.png")
# => Picasa::Presenter::Photo


When request is authenticated, response will contain private data, however this can be controlled by access parameter.

You can authenticate by specifing access_token:

client = "", access_token: "access-token")

As authenticating by providing password is no longer possible due to google API shutdown you need to set access_token for authenticated requests.

One time usage

For one time usage, you can retrieve access_token from google playground:

OAuth2 integration is not yet supported in this gem.

Permanent server side usage

  • Go to
  • Register an account and create project
  • On "APIs & auth > Credentials" click "Create new Client ID"
  • Choose "Installed application > Other"
  • Note "Client ID" and "Client secret"
  • Craft URL replacing YOUR_CLIENT_ID
  • Visit URL, grant access to your account and note code
  • Install gem signet
  • One time setup, to fetch refresh_token
client_id = "client-id"
client_secret = "client-secret"
code = "authorization-code"

require "signet/oauth_2/client"
signet =
  code: code,
  token_credential_uri: "",
  client_id: client_id,
  client_secret: client_secret,
  redirect_uri: "urn:ietf:wg:oauth:2.0:oob"
  • Note refresh_token
  • Before gem usage, you can get access_token by:
require "signet/oauth_2/client"
signet =
  client_id: client_id,
  client_secret: client_secret,
  token_credential_uri: "",
  refresh_token: refresh_token

# Use access token with picasa gem


You can connect via proxy server setting https_proxy or HTTPS_PROXY environment variable to valid URL.


You can install thor script for uploading all photos and videos from given directory:

thor install --as imagery --force

Updating script can be done by:

thor update imagery

And then use it (it will create album taking title from folder name and upload all photos from that directory): GOOGLE_ACCESS_TOKEN=access-token thor imagery:upload path-to-folder-with-photos

If your upload was somehow interrupted, you can resume it by adding --continue option: GOOGLE_ACCESS_TOKEN=access-token thor imagery:upload --continue path-to-folder-with-photos

If you run out of quota and want to resize images to fit Picasa free storage limits, you can install rmagick gem and run (this will modify files):

thor imagery:resize path-to-folder-with-photos


Picasa uses gzipped requests to speedup fetching results. Benchmarks are available on Vinicius Teles gist

Continuous Integration

Build Status



Copyright (c) Wojciech Wnętrzak, released under the MIT license.