WGG Encryptor/API Docs
WGG Encryptor API
Encrypt .lua files to .wgg format programmatically via our REST API.
Public API

The WGG Encryptor API allows you to encrypt Lua scripts into the proprietary .wgg format using AES-256-CBC encryption. Files are processed server-side and encrypted data is returned as base64-encoded strings. No files are stored on the server after encryption.

Endpoint
POST /api/v1/encrypt

Request

Content-Type: multipart/form-data
FieldTypeDescription
filesFile[]One or more .lua files to encrypt

Constraints

  • Only .lua files are accepted
  • Maximum file size: 5 MB per file
  • Maximum 20 files per request

Success Response (200)

{
  "files": [
    {
      "name": "script.wgg",
      "data": "base64_encoded_encrypted_data...",
      "size": 256
    }
  ]
}

Response Fields

FieldTypeDescription
namestringEncrypted filename (.wgg extension)
datastringBase64-encoded encrypted file content
sizenumberSize of encrypted data in bytes
Code Examples
curl -X POST \
  -F "files=@script.lua" \
  -F "files=@another.lua" \
  https://your-domain.com/api/v1/encrypt
Rate Limits
Requests are rate-limited per IP address.
LimitValue
Requests per minute60

Rate Limit Response Headers

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp when the window resets
Retry-AfterSeconds to wait (only on 429 responses)
Error Reference
StatusCodeDescription
400NO_FILESNo files were provided in the request
400INVALID_FILE_TYPEA file does not have a .lua extension
400FILE_TOO_LARGEA file exceeds the 5 MB size limit
400TOO_MANY_FILESMore than 20 files in a single request
429RATE_LIMITEDToo many requests — try again later
500ENCRYPTION_ERRORServer-side encryption failure

Error Response Format

{
  "error": "Human-readable error message",
  "code": "ERROR_CODE"
}