> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.id.me/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.id.me/_mcp/server.

# Ruby on Rails

> Learn more about integrating using Ruby on Rails

Version 1.0

Released November 18, 2021

\
\


View on Github

This is a sample seed Ruby Web App built with Sinatra

> **Note**
>
> You will need an [ID.me developer account](https://api.id.me/en/registration/new) to complete this process

## Prerequisites

You must have `ruby` and `rubygems` installed

## Installation

Download the [code](https://github.com/IDme/ruby-on-rails-sample-code)

Reach out to your ID.me solution consultant for access to the code

Install the required gems

```bash
bundle install
```

Configure your OAuth settings in `oauth_controller.rb` with the values provided in your [developer account](https://api.id.me/en/session/new)

```ruby
CLIENT_ID      = "YOUR_CLIENT_ID"
CLIENT_SECRET  = "YOUR_CLIENT_SECRET"
redirect_uri   = "YOUR_REDIRECT_URI"
```

Configure OAuth settings in index.haml

```ruby
data-client-id = "[YOUR_CLIENT_ID]"
data-redirect  = "[YOUR_REDIRECT_URI]"
data-scope     = "[SCOPES]"
```

Start the server

```bash
rails server
```

## Steps for successful verification

Select the **Verify with ID.me** button

Complete the user flow

Allow the release of data

View success messaging

## Steps for unsuccessful verification

Select the **Verify with ID.me** button

Complete the user flow

Deny the release of data

View error messaging