{
  "slug": "secure-api-proxy-bubble-io",
  "title": "Secure API Proxy for Bubble.io API Connector",
  "metaDescription": "Secure your Bubble.io API calls. Route third-party requests through RealComposer to store credentials encrypted at the edge and filter bloated responses.",
  "headline": "Shield Sensitive API Credentials in Bubble Apps and Workflows",
  "category": "security",
  "categoryLabel": "Security & Secret Vault",
  "urgency": 10,
  "clientPlatform": "Bubble",
  "upstreamServices": [
    "Stripe",
    "OpenAI",
    "Airtable"
  ],
  "searchIntentQuery": "secure backend proxy for bubble io api connector",
  "directAnswerSummary": "To prevent API keys from leaking through the Bubble.io API Connector, route high-value third-party requests through RealComposer. RealComposer stores credentials encrypted at the edge and filters bloated responses, reducing the payload size that Bubble servers must parse.",
  "problem": {
    "title": "Bubble API Connector Key Visibility Risks",
    "explanation": "In Bubble.io, shared team editors can see plaintext keys in the API Connector plugin tab, and client-side executed calls can expose headers to the browser console. Furthermore, Bubble charges for Workload Units (WU) when parsing massive third-party JSON payloads.",
    "risks": [
      "Team collaborators inspecting production keys in the Bubble editor",
      "High Workload Unit (WU) consumption when Bubble parses 100+ unneeded fields",
      "Exposed credentials during browser network debugging"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Configure Keys in Secret Vault",
      "description": "Keep master API keys out of Bubble and in RealComposer AES-256 vault."
    },
    {
      "stepNumber": 2,
      "title": "Slim the Response for Bubble",
      "description": "Use the Visual Field Picker to extract only the 3-5 fields Bubble needs."
    },
    {
      "stepNumber": 3,
      "title": "Call RealComposer in Bubble API Connector",
      "description": "Initialize call in Bubble pointing to your clean edge URL."
    }
  ],
  "pipelineConfig": {
    "name": "Bubble.io Slimmed Proxy",
    "method": "GET",
    "cacheTtlSeconds": 60,
    "steps": [
      {
        "stepKey": "data",
        "upstreamUrlTemplate": "https://api.stripe.com/v1/invoices/{{query.invoiceId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.STRIPE_SECRET_KEY}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "invoiceId",
          "sourceStep": "data",
          "sourcePath": "id"
        },
        {
          "targetPath": "amountDue",
          "sourceStep": "data",
          "sourcePath": "amount_due",
          "type": "number"
        },
        {
          "targetPath": "status",
          "sourceStep": "data",
          "sourcePath": "status"
        },
        {
          "targetPath": "hostedUrl",
          "sourceStep": "data",
          "sourcePath": "hosted_invoice_url"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "id": "in_123",
    "amount_due": 4900,
    "status": "paid",
    "hosted_invoice_url": "https://invoice.stripe.com/123"
  },
  "sampleSlimmedOutput": {
    "invoiceId": "in_123",
    "amountDue": 4900,
    "status": "paid",
    "hostedUrl": "https://invoice.stripe.com/123"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/acme/bubble-invoice?invoiceId=in_123\"",
  "faqs": [
    {
      "question": "Does trimming JSON save Bubble Workload Units?",
      "answer": "Yes. Bubble consumes compute based on payload volume and JSON complexity. Slimming payloads by 80%+ reduces WU consumption."
    }
  ],
  "relatedRecipeSlugs": [
    "call-stripe-from-flutterflow-securely",
    "trim-stripe-json-for-mobile-apps"
  ],
  "links": {
    "page": "https://realcomposer.com/recipes/secure-api-proxy-bubble-io",
    "markdown": "https://realcomposer.com/recipes/secure-api-proxy-bubble-io.md",
    "json": "https://realcomposer.com/recipes/secure-api-proxy-bubble-io.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=secure-api-proxy-bubble-io&via=agent"
  }
}