{
  "slug": "appsmith-secure-api-proxy",
  "title": "Appsmith Secure API Proxy for Third Party Credentials",
  "metaTitle": "Appsmith Secure API Proxy for Third - RealComposer",
  "metaDescription": "Appsmith secure api proxy for third party credentials. Appsmith CORS fix for REST API via RealComposer OPTIONS plus vault headers.",
  "headline": "Low-code REST API BFF for Appsmith",
  "category": "ecosystem",
  "categoryLabel": "Platforms & Frameworks",
  "urgency": 8,
  "clientPlatform": "Appsmith",
  "upstreamServices": [
    "REST API"
  ],
  "searchIntentQuery": "appsmith secure api proxy for third party credentials",
  "directAnswerSummary": "Appsmith browsers cannot call https://jsonplaceholder.typicode.com/users/{{query.userId}} directly because of CORS and hidden credentials. RealComposer responds to OPTIONS and proxies authorized traffic.",
  "problem": {
    "title": "Appsmith cannot attach secret headers to REST API",
    "explanation": "Appsmith runs in the browser or a sandbox without a secret store. REST API rejects unsigned browser origins or requires server-only headers.",
    "risks": [
      "Proxy hacks that break when vendors tighten CSP",
      "Zapier-only workarounds adding cost and latency",
      "Guest users seeing failed network requests in demos"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Bind vault keys to the Worker",
      "description": "Create API_BEARER_TOKEN vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "stepNumber": 2,
      "title": "Set headers, mapping, and cache TTL",
      "description": "Point step upstream at https://jsonplaceholder.typicode.com/users/{{query.userId}} with GET. Add output mapping fields that mirror the JSON contract your screen already expects. Leave cache TTL at 0 when each response is user-specific (include userId or record id in query params before enabling cache)."
    },
    {
      "stepNumber": 3,
      "title": "Call from Appsmith",
      "description": "Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.",
      "codeSnippet": "{{ fetch('https://realcomposer.com/v1/workspace/appsmith-secure-api-proxy', { headers: { Authorization: 'Bearer rc_live_token' } }).then(r => r.json()) }}"
    }
  ],
  "pipelineConfig": {
    "name": "Appsmith Secure API Proxy for Third Party Credentials",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "upstream",
        "upstreamUrlTemplate": "https://jsonplaceholder.typicode.com/users/{{query.userId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.API_BEARER_TOKEN}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "userId",
          "sourcePath": "id",
          "type": "number",
          "sourceStep": "upstream"
        },
        {
          "targetPath": "name",
          "sourcePath": "name",
          "type": "string",
          "sourceStep": "upstream"
        },
        {
          "targetPath": "email",
          "sourcePath": "email",
          "type": "string",
          "sourceStep": "upstream"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_appsmith",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "appsmith-secure-api-proxy"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "userId": "sample",
    "name": "sample",
    "email": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/appsmith-secure-api-proxy\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Does Appsmith need CORS changes after adding RealComposer?",
      "answer": "Yes for appsmith-secure-api-proxy. Ship only an rc_live_ client token in Appsmith; RealComposer injects API_BEARER_TOKEN on https://jsonplaceholder.typicode.com/users/{{query.userId}}."
    },
    {
      "question": "What cache key does RealComposer use?",
      "answer": "Cache key for appsmith-secure-api-proxy: internal edge-cache path plus sorted query. Identical params hit; vary userId per user."
    },
    {
      "question": "How do I rotate upstream credentials?",
      "answer": "Rotate vault secrets for appsmith-secure-api-proxy anytime; clients keep the same rc_live_ token."
    }
  ],
  "relatedRecipeSlugs": [
    "call-stripe-from-flutterflow-securely",
    "call-stripe-from-flutterflow-securely",
    "call-stripe-from-flutterflow-securely"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/appsmith-secure-api-proxy",
    "markdown": "https://realcomposer.com/recipes/appsmith-secure-api-proxy.md",
    "json": "https://realcomposer.com/recipes/appsmith-secure-api-proxy.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=appsmith-secure-api-proxy&via=agent"
  }
}