-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start
REDZ edited this page Aug 22, 2025
·
2 revisions
- .NET 8.0 SDK installed
- MongoDB instance running (local or cloud)
git clone https://github.com/onlyredz/REDZAuthAPI-v1.0.git
cd REDZAuthAPI-v1.0Copy the example configuration:
cp appsettings.Example.json appsettings.jsonEdit appsettings.json with your settings:
{
"ConnectionStrings": {
"MongoDB": "mongodb://localhost:27017"
},
"SecuritySettings": {
"AesEncryptionKey": "MySuperSecretKey32CharactersLong123"
},
"WebhookSettings": {
"DiscordWebhookUrl": "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
}
}dotnet restore
dotnet run- Open your browser and go to:
https://localhost:7001/swagger - Test the endpoints using the interactive Swagger UI
"ConnectionStrings": {
"MongoDB": "mongodb://localhost:27017"
}"ConnectionStrings": {
"MongoDB": "mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority"
}Use this PowerShell command to generate a secure key:
-join ((65..90) + (97..122) + (48..57) | Get-Random -Count 32 | % {[char]$_})curl -X POST "https://localhost:7001/api/license/generate?plan=mensal"curl -X POST "https://localhost:7001/api/auth/register" \
-H "Content-Type: application/json" \
-d '{
"username": "testuser",
"password": "password123",
"key": "MENSAL-ABCD-1234",
"hwid": "test-hwid-123",
"ip": "192.168.1.1"
}'curl -X POST "https://localhost:7001/api/auth/login" \
-H "Content-Type: application/json" \
-d '{
"username": "testuser",
"password": "password123",
"hwid": "test-hwid-123",
"ip": "192.168.1.1"
}'curl -X GET "https://localhost:7001/apistatus"If you get a port conflict, the API will automatically use the next available port. Check the console output for the correct URL.
- Ensure MongoDB is running
- Check your connection string
- For local MongoDB:
mongodb://localhost:27017 - For cloud: Use your MongoDB Atlas connection string
dotnet clean
dotnet restore
dotnet build- Read the full Setup Guide for detailed instructions
- Check the Configuration Guide for advanced settings
- Review the Security Guide for production considerations
- Test all endpoints using the Swagger UI
- Configure your Discord webhook for monitoring
- This is a development setup - add authentication for production
- The admin endpoints are unprotected - implement proper security
- Use HTTPS in production environments
- Backup your database regularly
- Monitor logs for suspicious activity
Need help? Check the main README.md or create an issue in the GitHub repository.