OneBurn is a simple yet powerful open-source API that allows you to generate one-time self-destructing links for sensitive secrets (passwords, tokens, notes, etc.). Secrets can be optionally protected with an IP address and a password.
π¦ Lightweight | π Secure | 𧨠Burn-After-Read | βοΈ Redis-backed
https://oneburn.vercel.app/
- π One-time viewing β auto-deletes secret after first access.
- π IP restriction β allow viewing from a specific IP only.
- π Password protection β require password to unlock secret.
- β±οΈ TTL (Time-to-Live) β secret automatically expires.
- β‘ Fast, stateless API using Redis.
- π§± Built with Node.js + Express + Redis.
Store a secret and generate a one-time link.
{
"encryptedSecret": "your-encrypted-data",
"ttl": 300,
"allowedIp": "123.123.123.123(optional ip)",
"password": "optionalPassword"
}| Field | Type | Description |
|---|---|---|
| encryptedSecret | string | The encrypted secret to store (required) |
| ttl | number | Time-to-live in seconds (optional, default 300) |
| allowedIp | string | IP address allowed to access the secret (optional) |
| password | string | Password required to unlock the secret (optional) |
{
"link": "http://localhost:3001/api/view/your-token"
}Retrieve and delete a one-time secret.
{
"password": "optionalPassword"
}| Field | Type | Description |
|---|---|---|
| password | string | Required only if the secret is password protected |
{
"encryptedSecret": "your-encrypted-data"
}| Code | Message |
|---|---|
| 404 | Secret already viewed or expired |
| 403 | IP address not allowed or wrong password |
| 401 | Password required |
| 500 | Server/internal error |
Create a .env file in the root directory:
PORT=3001
API_KEY=your_super_secret_api_key
REDIS_URL=redis://localhost:6379
API_KEY: Required for API authentication.REDIS_URL: (Optional) Redis Cloud or local instance.
git clone https://github.com/yourusername/oneburn.git
cd oneburn
npm install
cp .env.example .envEdit .env with your own values for API_KEY, PORT, and optionally REDIS_URL.
npm startServer runs at http://localhost:3001
All API requests must include the API key in headers:
Authorization: Bearer your_api_key
oneburn/
βββ auth.js
βββ server.js
βββ .env
βββ .gitignore
βββ README.md
βββ package.json
curl -X POST http://localhost:3001/api/store \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"encryptedSecret":"hello world","ttl":600,"password":"1234"}'curl -X POST http://localhost:3001/api/view/<token> \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"password":"1234"}'- Node.js
- Express.js
- Redis (Cloud or Local)
- dotenv
- uuid
- crypto
- Fork the repo
- Create your branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m "Add your feature" - Push to the branch:
git push origin feature/your-feature - Open a Pull Request
MIT License
MIT License
Copyright (c) 2025 AdhwaithAS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.