diff --git a/docs/consultations/gemini-curseforge-upload-automation-2026-04-13.md b/docs/consultations/gemini-curseforge-upload-automation-2026-04-13.md index 1bff01c..0a0f4fe 100644 --- a/docs/consultations/gemini-curseforge-upload-automation-2026-04-13.md +++ b/docs/consultations/gemini-curseforge-upload-automation-2026-04-13.md @@ -57,4 +57,79 @@ Thanks Gemini! Short one today but it'll unlock a lot if the answer is yes. 🔥 --- -*[Gemini's response will be added here after consultation]* +## Gemini's Response (April 13, 2026) + +**Summary:** Yes, CurseForge has an upload API — but it requires a separate Author API Token (not the Core API key we already have). Different endpoint, different auth header. Files enter a review queue but can be held with `isMarkedForManualRelease`. Game version IDs are static integers — look them up once and hardcode them. + +--- + +### 1. Two Different Keys + +The existing `$2a$10$` Core API key is **read-only** — ModpackChecker lookups only. File uploads require a separate **Author API Token** generated from CurseForge Account Settings → API Tokens. + +- **Upload endpoint:** `https://minecraft.curseforge.com/api/projects/1512533/upload-file` +- **Auth header:** `X-Api-Token` (NOT `x-api-key`) + +### 2. Required Metadata + +`multipart/form-data` with two fields: `file` (the jar binary) and `metadata` (JSON string). + +Minimum required JSON fields: +- `changelog` (string) +- `changelogType` ("text", "html", or "markdown") +- `releaseType` ("alpha", "beta", or "release") +- `gameVersions` (array of integers — game version ID + mod loader ID) + +Game version IDs fetched via: `GET https://api.curseforge.com/v1/games/432/versions` using the existing Core API key. Since 1.21.1/1.20.1/1.16.5/NeoForge/Forge IDs are static, look them up once and hardcode them. + +### 3. Review Queue + +Files enter the standard review queue — not instant. Use `"isMarkedForManualRelease": true` in metadata to hold approved files until manual publish (useful for coordinating with Discord announcements). + +### 4. Minimal Upload Script (bash) + +```bash +PROJECT_ID="1512533" +CF_TOKEN="your_author_token_here" +JAR_PATH="/path/to/discord-rules-1.21.1.jar" + +CF_METADATA=$(cat <