Get started with BundleUp in a Rails application. This guide walks you through creating an authorization flow to connect a third-party service (GitHub in this example) and then uses that connection to fetch API data via BundleUp’s unified API. By the end of this guide, you’ll:Documentation Index
Fetch the complete documentation index at: https://docs.bundleup.io/llms.txt
Use this file to discover all available pages before exploring further.
- Redirect a user through an OAuth-style authorization flow
- Receive a
connection_id - Use that
connection_idserver-side with the Ruby SDK to fetch data
Prerequisites
Before you begin, make sure you have:- A BundleUp account
- A BundleUp API key (server-side)
- Your BundleUp Client ID (used for authorization redirects)
- An Integration ID for the service you want to connect (for example,
github) - Ruby 2.7+ and Rails installed
You can find your API key, Client ID, and Integration IDs in the BundleUp dashboard.
Step 1: Create a new Rails app
Create a fresh Rails project:Step 2: Install the BundleUp Ruby SDK
Add thebundleup-sdk gem to your Gemfile:
Step 3: Configure environment variables
Create a.env file (or use your preferred secrets manager) with:
.env
Step 4: Add routes
Inconfig/routes.rb, define the home and callback endpoints:
config/routes.rb
Step 5: Create the authorization link
Inapp/controllers/home_controller.rb, add:
app/controllers/home_controller.rb
app/views/home/index.html.erb
Step 6: Handle the callback and fetch data
Updatecallback action in HomeController:
app/controllers/home_controller.rb
app/views/home/callback.html.erb:
app/views/home/callback.html.erb
connection_id to fetch a unified API resource using the Ruby SDK.
Step 7: Run your application
Start the Rails server:What’s next?
- Persist
connection_idto your database for later use - Add authenticated views that use the Ruby SDK to fetch user data
- Support additional integrations with no auth changes

