Mailchimp api proxy for react native signup
In-app newsletter opt-in without API keys
Mobile posts to edge; Mailchimp list subscribe runs server-side. For "mailchimp api proxy for react native signup", 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 React Native hit only https://realcomposer.com/v1/workspace/mailchimp-api-proxy-react-native with an rc_live_ client token.
Mailchimp keys in React Native network tabs
React Native ships code or scripts to end-user devices. Any Mailchimp bearer token in those bundles can be copied from DevTools, proxies, or repackaged apps.
- Shared React Native projects revealing Mailchimp tokens
- Sudden Mailchimp quota burn from scripted abuse
- Inability to rotate keys without redeploying clients
How RealComposer Solves This at the Edge
Bind vault keys to the Worker
Add MAILCHIMP_BASIC_AUTH to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream.
Target the real upstream URL
Point step mailchimp at https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10 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).
Call from React Native
Call https://realcomposer.com/v1/workspace/mailchimp-api-proxy-react-native with a restricted rc_live_ client token. React Native never sends upstream secrets.
const res = await fetch('https://realcomposer.com/v1/workspace/mailchimp-api-proxy-react-native', {
headers: { Authorization: 'Bearer rc_live_your_token' }
});
{
"requestId": "req_mailchim",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "mailchimp-api-proxy-react-native"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"memberId": "sample",
"email": "sample",
"status": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 1
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 3
- Payload
- 251 B to 56 B (-78%)
curl -X GET "https://realcomposer.com/v1/workspace/mailchimp-api-proxy-react-native" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Which Mailchimp credential belongs in the vault for this pipeline?
Yes for mailchimp-api-proxy-react-native. Ship only an rc_live_ client token in React Native; RealComposer injects MAILCHIMP_BASIC_AUTH on https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10.
What cache key does RealComposer use?
mailchimp-api-proxy-react-native POST steps bypass caches.default even if cacheTtlSeconds is set in the dashboard.
How do I rotate upstream credentials?
Rotate vault secrets for mailchimp-api-proxy-react-native anytime; clients keep the same rc_live_ token.
Sources & Definitions Used in This Answer
Deploy this React Native + Mailchimp Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.