Pinterest API wrapper for Ruby.

View on GitHub


Gem Version Dependency Status Build Status Coverage Status

A tiny JSON API framework for Ruby on Rails.


Pinterest API wrapper.


Basic authorization flow

require "pinterest"

# Create the client
client = "ID", client_secret: "SECRET")

# Authorization
url = "https://localhost:3000" # The URL MUST be HTTPS and configured on Pinterest Apps console.

puts client.authorization_url(url) # Send the user to this URL.

# ...

# Start a webserver that will listen on the url above, it will get called with a authorization code in the query string.
query = request.params[:code]

token = client.fetch_access_token(query) # This token can be saved for later use (see below).
client.access_token = token

# Play with the API!

Authenticated flow

require "pinterest"

# Fetch the token saved above
token = "TOKEN"

# Create the client
client = token)

# Play with the API!

API Documentation

The API documentation can be found here.

Contributing to pinterest-ruby


Copyright (C) 2017 and above Shogun

Licensed under the MIT license, which can be found at

Your browser is obsolete. For the best browsing experience, update it for free by visiting BrowseHappy.
There is a shiny new version. Update now!
Made by a proud Italian!