PasswordPing Ruby Client Library

Build Status


This README covers the following topics:


The compiled library is available as a Ruby Gem:

gem install passwordping


You can build the project from the source in this repository.

API Overview

Here's the API in a nutshell.

require 'passwordping'

# Create a new PasswordPing instance - this is our primary interface for making API calls
passwordping = YOUR_API_KEY, secret: YOUR_API_SECRET)

# Check whether a password has been compromised
if passwordping.check_password("password-to-test")
    puts("Password is compromised")
    puts("Password is not compromised")

# Check whether a specific set of credentials are compromised
if passwordping.check_credentials("[email protected]", "password-to-test")
    puts("Credentials are compromised")
    puts("Credentials are not compromised")

# get all exposures for a given user
exposures = passwordping.get_exposures_for_user("[email protected]")
puts(exposures.count.to_s + " exposures found for [email protected]")

# now get the full details for the first exposure found
details = passwordping.get_exposure_details(exposures.exposures[0])
puts("First exposure for [email protected] was " + details.title)

More information in reference format can be found below.

The PasswordPing constructor

The standard constructor takes the API key and secret you were issued on PasswordPing signup.

passwordping = PasswordPing::PasswordPing(YOUR_API_KEY, YOUR_API_SECRET)

If you were instructed to use an alternate API endpoint, you may call the overloaded constructor and pass the base URL you were provided.

passwordping = PasswordPing::PasswordPing(YOUR_API_KEY, YOUR_API_SECRET, "")

Platform Requirements

OSX and Linux platforms are fully supported. Windows is not, since FFI support is needed for some of the cryptography libraries, which is problematic on Windows.


The RubyDocs contain more complete references for the API functions.

They can be found here:


The gem is available as open source under the terms of the MIT License.