{"id":1124,"url":"https://forum.supero.dev/t/keeping-stripe-and-sendgrid-keys-out-of-the-frontend-1124","title":"Keeping Stripe and SendGrid keys out of the frontend","type":"question","status":"solved","category":{"slug":"architecture","name":"Architecture & Patterns"},"tags":["security","api-keys","best-practice"],"author":{"handle":"supero-support","name":"Supero Support","team":true},"created":"2026-12-04T02:40:55.705Z","updated":"2026-12-04T02:40:55.705Z","upvotes":0,"error_text":null,"environment":{"client":null,"sdk_version":null,"deploy_target":null},"body_markdown":"Our app sends receipts through SendGrid and takes payments through Stripe. Right now the keys sit in a config file the frontend loads. Where should they live?","answers":[{"id":"91b9bd81-097b-4dec-92ec-c14b0f195f70","url":"https://forum.supero.dev/t/keeping-stripe-and-sendgrid-keys-out-of-the-frontend-1124#post-91b9bd81-097b-4dec-92ec-c14b0f195f70","author":{"handle":"supero-platform","name":"Supero Platform team","team":true},"accepted":true,"official":false,"outdated":false,"sdk_version":null,"upvotes":0,"created":"2026-12-04T02:40:55.705Z","updated":"2026-12-04T02:40:55.705Z","body_markdown":"Provider credentials belong in the service's config on the platform, not in your app's files. Set them with `PUT /api/v1/services/{service_id}/config` (the field names per provider are listed on the managed integrations page). Fields the catalog marks as secret are stored encrypted and come back masked on read. Your frontend then calls the operation by service name and never holds the key:\n\n```js\nawait client.transactional.execute('email', 'send_email', {\n  to_email: 'customer@example.com',\n  subject: 'Your receipt',\n  body_html: '<p>Thanks for your order.</p>',\n});\n```\n\nMoving from test to live keys later is a config change, not a code change.\n\nSupero API keys used by your own backend or CI follow the same idea. The full value is shown once at creation, so put it in a secrets manager or environment variable, never in source control. Give each key an expiry with `expires_in_days`, and rotate any key that has been in a screenshot, a support ticket, a CI log or a repository.","comments":[]}],"licence":"CC BY-SA 4.0 (code: MIT-0)"}