Databutton
DiscordSign up
  • Getting Started
    • Databutton University
    • Meet the Databutton AI agent
  • Help & FAQ
  • Prompting in Databutton
    • Top prompting strategies
    • Prompting app UI & design
    • Prompting up your backend (APIs)
    • Troubleshooting prompt
    • Connecting UI with the Backend
    • Prompt Gallery
  • Using Tasks
    • How to use tasks in Databutton
    • Writing a good task
    • Chaining tasks
  • Task Gallery
  • Integrating SaaS Services
    • Authentication Integration
      • Firebase Integration
      • Supabase Integration
    • Working with Firestore Database
    • Working with Supabase Table
    • Stripe Integration
  • App Configurations
    • Package Installations
    • Managing Secrets
    • Customising Agent Behavior
    • Invite Collaborators
    • Opening Dev APIs
    • Customising App Design
  • Tutorials
    • Configuring a custom domain for your app
  • Databutton MCP – Build tools for AI
  • Troubleshooting
    • Browser window crashes
Powered by GitBook
On this page
  • Use the Agent to Store Secrets (Recommended)
  • Adding Secrets Manually
  • Frequently Asked Questions

Was this helpful?

  1. App Configurations

Managing Secrets

Safely storing sensitive information, like API keys, is easy with the Secrets section.

PreviousPackage InstallationsNextCustomising Agent Behavior

Last updated 4 months ago

Was this helpful?

The Secrets tab in the Configuration section is your go-to place for securely storing sensitive information like API keys. This ensures your app’s backend stays safe and organized.

Use the Agent to Store Secrets (Recommended)

The easiest way to manage secrets is by letting the Agent handle it for you:

  1. Ask the Agent to store a secret.

  2. It will open an input box in the chat where you can enter your secret.

  3. Once submitted, the secret is securely saved in the Secrets section.


Adding Secrets Manually

  1. Go to the Secrets tab in the Configuration section.

  2. Click the + button to add a new secret.

  3. Enter a Name (e.g., OPENAI_API_KEY) and its Value (e.g., your API key).

  4. Hit Save to securely store the secret.


Frequently Asked Questions

How does the Databutton Agent handle secrets?

Databutton uses its own internal Python package that the agent is well-versed in for securely handling secrets. Here’s an example of how the agent retrieves a secret:

import databutton as db

api_key = db.secrets.get("OPENAI_API_KEY")

The above command retrieves the API key stored in the Secrets section under the name "OPENAI_API_KEY"

Can the secrets be accessed via the frontend?

No, secrets are securely stored and can only be accessed from the backend of your app.

Storing secrets : 1) Use the Agent to Store Secrets ; Right: Chat with the Agent and let it handle it for you. 2) Adding Secrets Manually ; Go to the Secrets tab in the Configuration menu on the left and add your New Secret and corresponding Value.