React native api gateway for cloudinary uploads
Mobile media uploads via edge signing
Sign Cloudinary uploads at the edge instead of shipping API secrets in the app bundle. For "react native api gateway for cloudinary uploads", 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 React Native hit only https://realcomposer.com/v1/workspace/best-api-gateway-cloudinary-react-native with an rc_live_ client token.
CORS blocks Cloudinary in React Native
Low-code React Native tools expose connector tokens in shared workspaces, so Cloudinary credentials leak to every editor.
- Browser console CORS errors blocking launches
- Editors pasting secrets into reusable components
- Inability to test locally without disabling security
How RealComposer Solves This at the Edge
Store upstream credentials in Secret Vault
Store CLOUDINARY_BASIC_AUTH in the vault. React Native never embeds the raw secret, only a revocable rc_live_ client token.
Target the real upstream URL
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 React Native
Allowed origins on the token should list every React Native host that calls this URL.
const res = await fetch('https://realcomposer.com/v1/workspace/best-api-gateway-cloudinary-react-native', {
headers: { Authorization: 'Bearer rc_live_your_token' }
});
{
"requestId": "req_best-api",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "best-api-gateway-cloudinary-react-native"
},
"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
- 259 B to 39 B (-85%)
curl -X GET "https://realcomposer.com/v1/workspace/best-api-gateway-cloudinary-react-native" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Which Cloudinary credential belongs in the vault for this pipeline?
Log request IDs for best-api-gateway-cloudinary-react-native, not raw Cloudinary payloads, because upstream bodies may include PII.
What cache key does RealComposer use?
Cache key for best-api-gateway-cloudinary-react-native: internal edge-cache path plus sorted query. Identical params hit; vary userId per user.
How do I rotate upstream credentials?
Upstream steps in best-api-gateway-cloudinary-react-native honor timeoutMs and optional fallback JSON without leaking secrets.
Sources & Definitions Used in This Answer
Deploy this React Native + Cloudinary Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.