Call Shopify Admin API from Frontend Store Securely
Shopify secrets stay out of Frontend / Web bundles
Frontend / Web cannot safely store Shopify production keys. Vault-bound headers reach https://{{secrets.SHOPIFY_STORE}}.myshopify.com/admin/api/2026-10/products.json?limit=5 on Workers while apps call your shopify-admin-api-frontend-proxy edge URL.
Why Frontend / Web leaks Shopify credentials
Attackers routinely extract Shopify secrets from Frontend / Web builds. Direct browser calls also expose internal error payloads with hostnames.
- Production Shopify keys copied from Frontend / Web bundles
- Compliance violations after credential leaks
- Attackers replaying vault-grade scopes from a laptop
How RealComposer Solves This at the Edge
Add vault secrets for this pipeline
Add SHOPIFY_ACCESS_TOKEN to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream.
Target the real upstream URL
Point step shopify at https://{{secrets.SHOPIFY_STORE}}.myshopify.com/admin/api/2026-10/products.json?limit=5 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 Frontend / Web
Allowed origins on the token should list every Frontend / Web host that calls this URL.
const res = await fetch('https://realcomposer.com/v1/workspace/shopify-admin-api-frontend-proxy', {
headers: { Authorization: 'Bearer rc_live_your_token' }
});
{
"requestId": "req_shopify-",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "shopify-admin-api-frontend-proxy"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"productId": "sample",
"title": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 1
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 2
- Payload
- 251 B to 39 B (-84%)
curl -X GET "https://realcomposer.com/v1/workspace/shopify-admin-api-frontend-proxy" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Which Shopify credential belongs in the vault for this pipeline?
Point Frontend / Web at /recipes/shopify-admin-api-frontend-proxy edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins.
Does POST traffic get cached?
Cache key for shopify-admin-api-frontend-proxy: internal edge-cache path plus sorted query. Identical params hit; vary userId per user.
What happens if an upstream step times out?
Rotate vault secrets for shopify-admin-api-frontend-proxy anytime; clients keep the same rc_live_ token.
Sources & Definitions Used in This Answer
Deploy this Frontend / Web + Shopify Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.