How to Connect Custom REST API to Framer
Low-code REST API BFF for Framer
Framer 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.
Framer cannot attach secret headers to REST API
Framer runs in the browser or a sandbox without a secret store. REST API rejects unsigned browser origins or requires server-only headers.
- Proxy hacks that break when vendors tighten CSP
- Zapier-only workarounds adding cost and latency
- Guest users seeing failed network requests in demos
How RealComposer Solves This at the Edge
Add vault secrets for this pipeline
Create API_BEARER_TOKEN vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders.
Configure upstream steps and output mapping
Use GET against https://jsonplaceholder.typicode.com/users/{{query.userId}}. Allowed origins on the client token should match leave cache ttl at 0 when each response is user-specific (include userid or record id in query params before enabling cache).
Fetch inside Framer overrides
Allowed origins on the token should list every Framer host that calls this URL.
fetch('https://realcomposer.com/v1/workspace/connect-custom-rest-api-to-framer', {
headers: { Authorization: 'Bearer rc_live_your_token' }
});
{
"requestId": "req_connect-",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "connect-custom-rest-api-to-framer"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"userId": "sample",
"name": "sample",
"email": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 1
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 3
- Payload
- 252 B to 52 B (-79%)
curl -X GET "https://realcomposer.com/v1/workspace/connect-custom-rest-api-to-framer" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Is it safe to log REST API responses in Framer?
Point Framer at /recipes/connect-custom-rest-api-to-framer edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins.
Will Anthropic or Linear prompt bodies be rewritten?
connect-custom-rest-api-to-framer POST steps bypass caches.default even if cacheTtlSeconds is set in the dashboard.
How do I rotate upstream credentials?
Upstream steps in connect-custom-rest-api-to-framer honor timeoutMs and optional fallback JSON without leaking secrets.
Sources & Definitions Used in This Answer
Deploy this Framer + REST API Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.