{
  "slug": "call-mailchimp-from-webflow-securely",
  "title": "Call mailchimp api from webflow without exposing api key",
  "metaTitle": "Call mailchimp api from webflow - RealComposer",
  "metaDescription": "Call mailchimp api from webflow without exposing api key. Keep Mailchimp keys in RealComposer Vault; Webflow uses rc_live_ tokens only.",
  "headline": "Webflow signup forms with hidden Mailchimp keys",
  "category": "security",
  "categoryLabel": "Security & Secret Vault",
  "urgency": 10,
  "clientPlatform": "Webflow",
  "upstreamServices": [
    "Mailchimp"
  ],
  "searchIntentQuery": "call mailchimp api from webflow without exposing api key",
  "directAnswerSummary": "RealComposer subscribes list members with API key injected server-side. For \"call mailchimp api from webflow without exposing api key\", store MAILCHIMP_BASIC_AUTH in Secret Vault, call https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10 from a Worker, and let Webflow hit only https://realcomposer.com/v1/workspace/call-mailchimp-from-webflow-securely with an rc_live_ client token.",
  "problem": {
    "title": "Mailchimp keys in Webflow network tabs",
    "explanation": "Webflow ships code or scripts to end-user devices. Any Mailchimp bearer token in those bundles can be copied from DevTools, proxies, or repackaged apps.",
    "risks": [
      "Shared Webflow projects revealing Mailchimp tokens",
      "Sudden Mailchimp quota burn from scripted abuse",
      "Inability to rotate keys without redeploying clients"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Add vault secrets for this pipeline",
      "description": "Add MAILCHIMP_BASIC_AUTH to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream."
    },
    {
      "stepNumber": 2,
      "title": "Target the real upstream URL",
      "description": "Configure headersTemplate to inject vault secrets, target https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10, and Add output mapping fields that mirror the JSON contract your screen already expects."
    },
    {
      "stepNumber": 3,
      "title": "Call from Webflow custom code",
      "description": "Call https://realcomposer.com/v1/workspace/call-mailchimp-from-webflow-securely with a restricted rc_live_ client token. Webflow never sends upstream secrets.",
      "codeSnippet": "fetch('https://realcomposer.com/v1/workspace/call-mailchimp-from-webflow-securely', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n}).then(r => r.json());"
    }
  ],
  "pipelineConfig": {
    "name": "Call mailchimp api from webflow without exposing api key",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "mailchimp",
        "upstreamUrlTemplate": "https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Basic {{secrets.MAILCHIMP_BASIC_AUTH}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "memberId",
          "sourcePath": "members.0.id",
          "type": "string",
          "sourceStep": "mailchimp"
        },
        {
          "targetPath": "email",
          "sourcePath": "members.0.email_address",
          "type": "string",
          "sourceStep": "mailchimp"
        },
        {
          "targetPath": "status",
          "sourcePath": "members.0.status",
          "type": "string",
          "sourceStep": "mailchimp"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_call-mai",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "call-mailchimp-from-webflow-securely"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "memberId": "sample",
    "email": "sample",
    "status": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/call-mailchimp-from-webflow-securely\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Does Webflow need CORS changes after adding RealComposer?",
      "answer": "Yes for call-mailchimp-from-webflow-securely. Ship only an rc_live_ client token in Webflow; RealComposer injects MAILCHIMP_BASIC_AUTH on https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10."
    },
    {
      "question": "What cache key does RealComposer use?",
      "answer": "call-mailchimp-from-webflow-securely forwards client JSON to POST upstreams unchanged; secrets interpolate only in URLs and header templates."
    },
    {
      "question": "Can I restrict which domains call this pipeline?",
      "answer": "Upstream steps in call-mailchimp-from-webflow-securely honor timeoutMs and optional fallback JSON without leaking secrets."
    }
  ],
  "relatedRecipeSlugs": [
    "call-private-api-from-webflow-securely",
    "sendgrid-frontend-proxy"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/call-mailchimp-from-webflow-securely",
    "markdown": "https://realcomposer.com/recipes/call-mailchimp-from-webflow-securely.md",
    "json": "https://realcomposer.com/recipes/call-mailchimp-from-webflow-securely.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=call-mailchimp-from-webflow-securely&via=agent"
  }
}