A lightweight FastAPI-based service to securely store and retrieve secrets using one-time tokens. Secrets are stored temporarily with TTL (Time-To-Live) and are deleted after first access.
🔗 Live Demo: https://secret-sharing-api.leapcell.app/docs
POST /post-secret/: Store a secret and get a unique token.GET /get-secret/{token}: Retrieve and delete the secret using the token.- TTL support: Secrets expire automatically after a set time (default: 60 minutes).
- Storage support: Redis (default) or DynamoDB (pluggable).
- Auto-generated OpenAPI docs.
- Python 3.11+
- Poetry
- Redis (running locally or remote)
git clone https://github.com/aakashkhanna/secret-sharing-api.git
poetry install
poetry run uvicorn secret_sharing_api.main:app --reloadAPI Docs:
- Swagger: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
To use Redis, configure:
REDIS_HOST=redis://localhost:6379/0
REDIS_PORT=50
REDIS_SECRET=secretTo use DynamoDB, configure:
AWS_ENDPOINT_URL=
AWS_REGION_NAME=
AWS_DYNAMO_NAME=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=poetry run pytest- Fork this repo
- Create a new branch:
git checkout -b feature/xyz - Submit a PR