Retool Public App Hide REST API Credentials
Vault-backed REST API proxy tuned for Retool
Never place API_BEARER_TOKEN inside Retool source. RealComposer injects them when calling https://jsonplaceholder.typicode.com/users/{{query.userId}}, so browsers see only a client token.
REST API keys in Retool network tabs
Retool ships code or scripts to end-user devices. Any REST API bearer token in those bundles can be copied from DevTools, proxies, or repackaged apps.
- Shared Retool projects revealing REST API tokens
- Sudden REST API quota burn from scripted abuse
- Inability to rotate keys without redeploying clients
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.
Target the real upstream URL
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).
Query from Retool
Call https://realcomposer.com/v1/workspace/retool-public-app-hide-api-credentials with a restricted rc_live_ client token. Retool never sends upstream secrets.
// REST resource or JS query
const rows = await fetch('https://realcomposer.com/v1/workspace/retool-public-app-hide-api-credentials', {
headers: { Authorization: 'Bearer rc_live_token' }
}).then(r => r.json());
{
"requestId": "req_retool-p",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "retool-public-app-hide-api-credentials"
},
"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
- 257 B to 52 B (-80%)
curl -X GET "https://realcomposer.com/v1/workspace/retool-public-app-hide-api-credentials" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Can Retool call REST API without holding the production key?
Log request IDs for retool-public-app-hide-api-credentials, not raw REST API payloads, because upstream bodies may include PII.
How do I forward JSON bodies to POST upstreams?
retool-public-app-hide-api-credentials forwards client JSON to POST upstreams unchanged; secrets interpolate only in URLs and header templates.
What happens if an upstream step times out?
Upstream steps in retool-public-app-hide-api-credentials honor timeoutMs and optional fallback JSON without leaking secrets.
Sources & Definitions Used in This Answer
Deploy this Retool + REST API Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.