Call cloudinary api from vue spa without secret key
Media transforms without Cloudinary admin secrets
Upload and transform URLs signed at the edge with API secret in Vault. For "call cloudinary api from vue spa without secret key", store CLOUDINARY_BASIC_AUTH in Secret Vault, call https://api.cloudinary.com/v1_1/{{secrets.CLOUDINARY_CLOUD_NAME}}/resources/image from a Worker, and let Vue / SPA hit only https://realcomposer.com/v1/workspace/call-cloudinary-from-vue-securely with an rc_live_ client token.
Cloudinary keys in Vue / SPA network tabs
Vue / SPA ships code or scripts to end-user devices. Any Cloudinary bearer token in those bundles can be copied from DevTools, proxies, or repackaged apps.
- Shared Vue / SPA projects revealing Cloudinary tokens
- Sudden Cloudinary 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
Create CLOUDINARY_BASIC_AUTH vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders.
Set headers, mapping, and cache TTL
Point step cloudinary at https://api.cloudinary.com/v1_1/{{secrets.CLOUDINARY_CLOUD_NAME}}/resources/image 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 Vue / SPA
Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.
const { data } = await useFetch('https://realcomposer.com/v1/workspace/call-cloudinary-from-vue-securely', {
headers: { Authorization: 'Bearer rc_live_your_token' }
});
{
"requestId": "req_call-clo",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "call-cloudinary-from-vue-securely"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"publicId": "sample",
"format": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 1
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 2
- Payload
- 252 B to 39 B (-85%)
curl -X GET "https://realcomposer.com/v1/workspace/call-cloudinary-from-vue-securely" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
What should Vue / SPA store instead of Cloudinary secrets?
Point Vue / SPA at /recipes/call-cloudinary-from-vue-securely edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins.
Will Anthropic or Linear prompt bodies be rewritten?
Cache key for call-cloudinary-from-vue-securely: internal edge-cache path plus sorted query. Identical params hit; vary userId per user.
How do I rotate upstream credentials?
Rotate vault secrets for call-cloudinary-from-vue-securely anytime; clients keep the same rc_live_ token.
Sources & Definitions Used in This Answer
Deploy this Vue / SPA + Cloudinary Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.