# How to use the app connector for API integration between Bubble apps: Step-by-St

- Tool: Bubble
- Difficulty: Intermediate
- Time required: 20-25 min
- Compatibility: All Bubble plans (Data API requires enabling)
- Last updated: March 2026

## TL;DR

Connect two Bubble apps via API by enabling the Data API on App A (Settings → API), then using the API Connector on App B to call App A's endpoints. This allows reading, creating, and modifying data across apps. You can share user data, sync records, and trigger workflows between separate Bubble applications without third-party middleware.

## Connect Two Bubble Apps via API

This tutorial shows you how to make two separate Bubble apps communicate through Bubble's built-in Data API and API Connector. App A exposes its data via API endpoints, and App B consumes those endpoints. This is useful for microservice architectures, multi-app ecosystems, or sharing data between a main app and an admin panel.

## Before you start

- Two Bubble apps (App A = data provider, App B = data consumer)
- Admin access to both apps
- Basic understanding of REST APIs and JSON
- The API Connector plugin installed on App B

## Step-by-step guide

### 1. Enable the Data API on App A

In App A, go to Settings → API. Check 'Enable Data API'. For each Data Type you want to expose, check the fields that should be accessible via API. You will see the API root URL: https://appname.bubbleapps.io/api/1.1/obj/. Note your API token from Settings → API → 'Generate a new API token'. This token authenticates requests from App B.

> Pro tip: Only expose the fields you actually need. Exposing all fields increases your attack surface and data transfer size.

**Expected result:** App A's Data API is enabled with specific Data Types and fields exposed, and you have an API token.

### 2. Configure the API Connector on App B

In App B, go to Plugins → API Connector → Add another API. Name it 'App A API'. Set authentication to 'Private key in header' with key name 'Authorization' and value 'Bearer [your-api-token]'. Add a GET call named 'Get Products' with URL: https://app-a.bubbleapps.io/api/1.1/obj/product. Set 'Use as' to Data. Click Initialize — Bubble will map the JSON response fields automatically.

**Expected result:** App B can query App A's Product data type through the API Connector.

### 3. Read Data from App A in App B

In App B's Design tab, add a Repeating Group. Set the Type of content to the API response type created by the API Connector. Set the Data source to 'Get data from an external API' → 'App A API - Get Products'. Map the response fields to Text elements in the cell. Add constraints to filter the API response if needed — you can pass constraint parameters in the URL (e.g., ?constraints=[{"key":"category","constraint_type":"equals","value":"electronics"}]).

**Expected result:** App B displays data from App A's database in a Repeating Group.

### 4. Create Data in App A from App B

Add a POST call in App B's API Connector named 'Create Product in A'. URL: https://app-a.bubbleapps.io/api/1.1/obj/product. Method: POST. In the body, add the fields as JSON parameters. Set 'Use as' to Action. In App B's workflow, use this action to create a new record in App A's database by passing field values from App B's form inputs.

```
{
  "name": "<name_value>",
  "price": <price_value>,
  "category": "<category_value>",
  "description": "<description_value>"
}
```

**Expected result:** App B can create new records in App A's database through the API.

### 5. Set Up Backend Workflow Triggers Between Apps

For more complex interactions, expose Backend Workflows on App A as API endpoints. In App A, go to the Workflow tab → Backend workflows. Create a workflow (e.g., 'process-order'). Check 'Expose as a public API workflow'. Add parameters the workflow accepts. From App B, call this endpoint via API Connector: POST to https://app-a.bubbleapps.io/api/1.1/wf/process-order with the required parameters in the body.

**Expected result:** App B can trigger complex backend workflows on App A, not just CRUD operations.

## Complete code example

File: `API Connector payload`

```json
{
  "api_name": "App A API",
  "authentication": {
    "type": "Private key in header",
    "key_name": "Authorization",
    "key_value": "Bearer YOUR_APP_A_API_TOKEN"
  },
  "calls": [
    {
      "name": "Get Products",
      "method": "GET",
      "url": "https://app-a.bubbleapps.io/api/1.1/obj/product",
      "use_as": "Data"
    },
    {
      "name": "Get Product By ID",
      "method": "GET",
      "url": "https://app-a.bubbleapps.io/api/1.1/obj/product/[product_id]",
      "use_as": "Data",
      "parameters": [
        {"key": "product_id", "value": "sample_id", "private": false}
      ]
    },
    {
      "name": "Create Product",
      "method": "POST",
      "url": "https://app-a.bubbleapps.io/api/1.1/obj/product",
      "use_as": "Action",
      "body": {
        "name": "<name>",
        "price": "<price>",
        "category": "<category>"
      }
    },
    {
      "name": "Update Product",
      "method": "PATCH",
      "url": "https://app-a.bubbleapps.io/api/1.1/obj/product/[product_id]",
      "use_as": "Action"
    },
    {
      "name": "Trigger Process Order",
      "method": "POST",
      "url": "https://app-a.bubbleapps.io/api/1.1/wf/process-order",
      "use_as": "Action",
      "body": {
        "order_id": "<order_id>",
        "user_email": "<email>"
      }
    }
  ]
}
```

## Common mistakes

- **Exposing the API token in client-safe parameters** — The API token grants full access to App A's data. If exposed client-side, anyone can read or modify data. Fix: Always mark the API token as 'Private' in the API Connector. Never check 'Client safe' on authentication parameters.
- **Not handling API pagination for large datasets** — Bubble's Data API returns a maximum of 100 items per request by default. If App A has more records, you will miss data. Fix: Use the cursor parameter for pagination: add '&cursor=[offset]' to requests and loop through pages.
- **Calling the development API URL from a live app** — Development and live databases are separate. Your live app would read test data. Fix: Use the version-d endpoint for development and version-live for production. Switch URLs when deploying.

## Best practices

- Mark API tokens as Private in the API Connector to keep them server-side.
- Only expose the Data Types and fields that App B actually needs.
- Handle pagination when querying large datasets (>100 records).
- Use the development API URL during testing and switch to live for production.
- Add error handling in App B's workflows for API call failures.
- Implement rate limiting awareness — Bubble APIs have request limits.

## Frequently asked questions

### Can both apps write to each other?

Yes. Enable the Data API on both apps and set up API Connectors on both. Each app can read from and write to the other using the respective API tokens.

### Is there a limit on API calls between Bubble apps?

Yes. Each Bubble app has API rate limits based on your plan. Free plans have stricter limits. Monitor usage in Settings → Metrics.

### Can I share user authentication between two Bubble apps?

Not natively. Users have separate accounts in each app. You can implement single sign-on by passing tokens via API, or use a third-party auth provider (Auth0, Firebase Auth) shared between both apps.

### Should I use the Data API or Backend Workflows for cross-app communication?

Use the Data API for simple CRUD operations. Use Backend Workflows when you need to trigger complex server-side logic with multiple steps.

### How do I handle errors when App A is down?

Add error handling in App B's workflows. If the API call fails, show an error message, log the failure, and optionally retry. For mission-critical integrations, RapidDev can build resilient cross-app architectures.

### Can I use webhooks instead of API calls?

Yes. App A can call App B's Backend Workflow endpoint whenever data changes (using a database trigger). This pushes updates in real-time instead of App B polling for changes.

---

Source: https://www.rapidevelopers.com/bubble-tutorial/use-app-connector-api-integration-between-bubble-apps
© RapidDev — https://www.rapidevelopers.com/bubble-tutorial/use-app-connector-api-integration-between-bubble-apps
