MARKETPLACE
PLUGINS
SECURE API KEYS
Secure API Keys logo

Secure API Keys

Published March 2026
   •    Updated this week

Plugin details

Secure API Key Generator & Validator (Server-side)
Secure API Key Generator & Validator helps you implement production-grade API authentication in Bubble applications without storing sensitive secrets in your database.

Instead of saving API keys in plain text, this plugin generates keys that can be verified cryptographically while ensuring the original secret is never stored. This approach significantly reduces the risk of key exposure in the event of a database leak.

The plugin follows security patterns used by platforms such as Stripe, Supabase, and AWS.

Key format

Generated API keys use the following structure:

<prefix>.<env>.<kid>.<secret>

Example:

swpk.live.0193f6b2-9f4b-7c2d-b2a1-6e9d9c6e8c4a.Np7K2sY9QhF3xV8cLm2RwT6uZp4JkA1b

Where:

  • prefix identifies the product or application
  • env specifies the environment (test or live)
  • kid is a unique key identifier (UUID-based)
  • secret is a randomly generated private value

Instead of storing the full API key, the plugin returns:

  • a unique salt
  • a SHA256 hash of the salt combined with the secret
  • a key identifier for reference

This ensures:

  • The full API key is never stored in the database
  • The secret cannot be reconstructed
  • Key validation remains extremely fast
  • The system is suitable for high-frequency API usage

The plugin works entirely server-side and is designed for performance-sensitive use cases such as:

  • API authentication
  • SaaS integrations
  • webhook verification
  • multi-tenant architectures
  • secure backend workflows

How it works

Step 1 — Generate an API key

Use the generate_api_key action.

Inputs:

  • prefix → identifies your product (example: swpk)
  • env → environment (test or live)

Outputs:

  • api_key → the full key (display once to the user)
  • env → environment
  • kid → key identifier
  • salt → random salt
  • hash → SHA256(salt + secret)
  • key_identifier → non-sensitive identifier for logs or UI

Store the following fields in your database:

  • env
  • kid
  • salt
  • hash

Do NOT store the full API key.

Step 2 — Verify an API key

Use the verify_api_key action when an API request is received.

Inputs:

  • api_key → the key provided by the client
  • prefix → expected prefix
  • kid → stored key id
  • salt → stored salt
  • hash → stored hash

Output:

  • valid → true or false
  • env → environment extracted from the key
  • reason → validation result

Typical workflow:

  • receive API key via Authorization header
  • extract the kid
  • retrieve stored salt and hash
  • call verify_api_key
  • allow or reject the request

Security design

The plugin uses salted SHA256 hashing:

hash = SHA256(salt + secret)

Because the secret is never stored:

  • Even a database breach cannot expose valid API keys
  • Keys cannot be reconstructed by developers or attackers
  • Each key uses a unique salt
  • Timing-safe comparison prevents timing attacks

Use cases

  • secure Bubble APIs
  • SaaS authentication systems
  • payment integrations
  • webhook signature validation
  • multi-environment setups (test/live)
  • reusable authentication infrastructure

Why this plugin exists

No-code tools allow teams to build products faster than ever. However, security standards should remain the same as traditional development environments.

This plugin helps developers implement robust authentication patterns without needing advanced cryptography knowledge.

License

This plugin is provided for free to support the Bubble developer community.

You are free to use it in commercial and non-commercial projects.

No warranty is provided. Always review your application security architecture before deploying to production.

Free

For everyone

stars   •   0 ratings
1 installs  
This plugin does not collect or track your personal data.

Other actions

Platform

Web & Native mobile

Contributor details

Amen from Nocode Afrique logo
Amen from Nocode Afrique
Joined 2021   •   13 Plugins
View contributor profile

Instructions

Plugin publication checklist (Free license)
1. Visibility

Plugin visibility → Public
Pricing → Free

2. Category

Category → Technical / Utilities
Plugin type → Server-side

3. Tags

Recommended tags:

  • api
  • security
  • authentication
  • backend
  • cryptography
  • developer tools

4. Usage example

Example inputs for generate_api_key:

prefix: swpk env: live

5. Best practices

  • Display the API key only once to the user
  • Never store the full API key in the database
  • Store only env, kid, salt and hash
  • Use kid as indexed field for fast lookup
  • Use verify_api_key in backend workflows only

6. Recommended database fields

  • env (text)
  • kid (text, indexed)
  • salt (text)
  • hash (text)
  • created_date (date)
  • revoked (yes/no)

7. Example Authorization header

Authorization: Bearer swpk.live.kid.secret

8. Recommended UX pattern

  • Show the API key once after generation
  • Allow regeneration of keys
  • Show only key_identifier in UI

Example:

swpk.live.0193f6b2-9f4b-7c2d-b2a1-6e9d9c6e8c4a

Types

This plugin can be found under the following types:

Categories

This plugin can be found under the following categories:

Resources

Support contact
Tutorial

Rating and reviews

No reviews yet

This plugin has not received any reviews.
Bubble