Using the API
Ludilol provides a REST API for automation. Authenticate with Personal Access Tokens (PATs) to access order data and manage game versions programmatically.
Creating a PAT
- Go to your account settings
- Navigate to Personal Access Tokens
- Click Create Token
- Configure:
- Name — A label for this token
- Scope — Choose what the token can access
- Game (optional) — Restrict to a specific game
- Expiration — When the token expires
- Click Create
WARNING
The token value is shown only once. Copy it immediately and store it securely.
Scopes
| Scope | Permissions |
|---|---|
| OData | Read-only access to your order data |
| GameVersions | Upload, list, and delete game versions |
API Endpoints
OData Orders Feed
http
GET /api/odata/orders
Authorization: Bearer YOUR_TOKENQuery up to 200 orders with OData filters:
/api/odata/orders?$filter=Status eq 'Fulfilled'&$top=50&$orderby=CreatedAtUtc descList Game Versions
http
GET /api/games/{gameId}/versions
Authorization: Bearer YOUR_TOKENUpload a New Version
http
POST /api/games/{gameId}/versions
Authorization: Bearer YOUR_TOKEN
Content-Type: multipart/form-data
file: (binary)
versionName: "1.2.0"
changelogHtml: "<p>Bug fixes</p>"
isDemo: falseMaximum file size: 200 MB.
Delete a Version
http
DELETE /api/games/{gameId}/versions/{versionId}
Authorization: Bearer YOUR_TOKENOnly non-published versions can be deleted.
CI/CD Integration
Use the API to automate your release pipeline:
bash
# Upload a new version after build
curl -X POST \
-H "Authorization: Bearer $LUDILOL_TOKEN" \
-F "file=@dist/game.zip" \
-F "versionName=$VERSION" \
-F "changelogHtml=<p>Release $VERSION</p>" \
https://your-site.com/api/games/$GAME_ID/versionsSecurity
- Tokens are hashed with SHA-256 before storage — Ludilol never stores the raw token
- Expired and revoked tokens are rejected
- Use short expiration periods for CI/CD tokens
- Revoke tokens you no longer need