Skip to main content
Get started with BundleUp in a Django application. This guide walks you through connecting to a third-party API (GitHub, in this example) and then using the resulting connection_id to fetch data through the BundleUp unified API. By the end of this guide, you’ll:
  • Redirect a user through an OAuth-style authorization flow
  • Receive a connection_id
  • Use that connection_id to make unified API calls via BundleUp

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)
  • Python 3.10+ installed
You can find your API key, Client ID, and Integration IDs in the BundleUp dashboard.

Step 1: Create a Django project

If you don’t already have a Django project:

Step 2: Install the BundleUp Python SDK

Install the official BundleUp SDK from PyPI:
This package lets your Django server use BundleUp’s unified API to fetch data after a user has authorized an integration.

Step 3: Configure Django settings

Add Django view URLs and your environment configuration:
  1. Create a .env file in your project root with:
.env
  1. Load these environment variables in settings.py (you can use python-dotenv or your own loader).
  2. In bundleup_django/urls.py, add routes:
bundleup_django/urls.py
In core/views.py, add a view that redirects a user to the BundleUp authorization endpoint:
core/views.py
Create a simple template core/templates/home.html with:
core/templates/home.html
Clicking this link sends users to authorize GitHub, and then they’re redirected back to /callback.

Step 5: Handle the callback and fetch data

When BundleUp redirects back to /callback, it includes a connection_id query parameter. Here’s how to read it and make a unified API call with the Python SDK:
core/views.py
And in core/templates/callback.html:
core/templates/callback.html
What’s happening here
  • connection_id ties a user + integration together
  • The Python SDK then makes authenticated calls using that connection
  • You can fetch repositories, calendar events, files, contacts, etc., depending on the integration

Step 6: Run your development server

Start the Django server:
Visit http://localhost:8000, click Connect GitHub, authorize, and you’ll see a list of repositories.

What’s next?

  • Persist connection_id to your database for later use
  • Add authenticated views that use the Python SDK to fetch user data
  • Support additional integrations with no auth changes