Solution for your API key needs!
Built in Go, cloud-ready, easy to integrate. Just clone & self-host.
Important
Note
⚙️ Populate the .env file with your credentials.
# Clone into your server or any microservice host
git clone https://github.com/t7abhay/Vaultlet
cd Vaultlet
cp .env_sample .env# Docker installation
docker build -t vaultlet-app .
docker run --rm --env-file .env -p 9098:9098 vaultlet-appPOST /api/v1/gen-apikey HTTP/1.1
Content-Type: application/json
{
"user_id": "some_user_id", // UUID required
"duration": 12 // Optional, in hours. If not set, API key will not expire
}Response
HTTP/1.1 200 OK
{
"success": true,
"message": "API key created",
"apiKey": "your_generated_api_key"
}POST /api/v1/validate-apikey HTTP/1.1
Content-Type: application/json
{
"user_id": "some_user_id", // UUID required
"api_key": "your_api_key"
}Response
HTTP/1.1 200 OK
{
"success": true,
"message": "Valid"
}| Code | Meaning |
|---|---|
| 201 | API key created successfully |
| 200 | API key validated |
| 500 | Service failed to validate/create API key |
| 401 | Invalid API key |
| 402 | No API key found |
| 400 | Invalid/Malformed request (Bad Request) |