Skip to content

Instantly share code, notes, and snippets.

@sleeyax
Forked from EpicKiwi/technic-platform-api.md
Last active May 15, 2019 18:58
Show Gist options
  • Save sleeyax/eb6fecd766f127175cd63c3ad42c52c1 to your computer and use it in GitHub Desktop.
Save sleeyax/eb6fecd766f127175cd63c3ad42c52c1 to your computer and use it in GitHub Desktop.
Reverse engeneering of the Technic platform API

Technic platform API

This is an attempt of reverse engineer the Technic platform API with a simple Wireshark and an official laucher. This is a simple HTTP based API returning JSON.

Global parameters

URL parameter build is always required to perform a request. The value can be anything but it seems to be a build number of the lauche; maybe for tracking reasons. If this parameters is not present in URL query parameters, all requests will return 401 Unauthorized response. For this document I used build=402 for all requests.

Endpoints

Base API url : http://api.technicpack.net Use this URL before each endpoint path listed below.

Search for modpacks

This endpoint is used to request for a list of modpacks based on a query

GET /search?q=<request>

Parameters :

  • request q : Search terms with + in place of spaces (special characters arn't URL encoded)

Response :

{
  "modpacks": [
    {
      "id": "<string-int>",
      "name": "<string>",
      "slug": "<string-slugifyed>",
      "url": "<string-absolute-url>"
    }
  ]
}
  • modpack : an array of 15 max found modpacks for this query
    • id : identifier for this modpack (as string)
    • name : Displayable name of this modpack
    • slug : slug of this modpack used to mention it in other endpoints
    • url : Absolute URL of modpack's technic platform page

Request a modpack

GET /modpack/<slug>

Parameters :

  • slug : slug of the modpack found in "Search for modpacks" endpoints

Response :

{
  "id": <int>,
  "name": "<string-slugifyed>",
  "displayName": "<string>",
  "user": "<string>",
  "url": "<string-absolute-url>",
  "platformUrl": "<string-absolute-url>",
  "minecraft": "<string-version>",
  "ratings": <int>,
  "downloads": <int>,
  "runs": <int>,
  "description": "<string>",
  "tags": "<string>",
  "isServer": <boolean>,
  "isOfficial": <boolean>,
  "version": "<string-version>",
  "forceDir": <boolean>,
  "feed": [
    {
      "user": "<string>",
      "date": <int-timestamp>,
      "content": "<string>",
      "avatar": "<string-absolute-url>",
      "url": "<string-absolute-url>"
    }
  ],
  "icon": {
    "url": "<string-absolute-url>",
    "md5": "<string-empty>"
  },
  "logo": {
    "url": "<string-absolute-url>",
    "md5": "<string-empty>"
  },
  "background": {
    "url": "<string-absolute-url>",
    "md5": "<string-empty>"
  },
  "solder": "<string-absolute-url>" | <null>,
  "discordServerId": "<string-snowflake>"
}
  • id : Identifier of this modpack (as number)
  • name : Slug of the modpack
  • displayName : Prettyn name of the modpack
  • user : Pretty username of modpack's author
  • url : Absolute URL to where you can download latest version of this modpack
  • platformUrl : Absolute URL of modpack's technic platform page
  • minecraft : Version of minecraft required to run this modpack
  • ratings : Number of ratings on this modpack
  • downloads : Number of unique downloads of this modpack
  • runs : Number of times the modpack was lauched
  • description : Description of this modpack
  • tags : Comma separated list of tags for this modpack
  • isServer : If this modpack is a server version
  • isOffical : If this modpack is an official one
  • version : Version of this modpack
  • forceDir : I don't know...
  • feed : An array of 10 max published changelogs about this modpack
    • user : Pretty username of changelog's author
    • date : Unix Timestamp when this article was published
    • content : Title of this article as plain text
    • avatar : Absolute URL to author's avatar
    • url : Absolute URL to technic platform's page of this changelog
  • icon : Icon of this modpack
    • url : Absolute URL of this modpack icon (empty string if there is not)
    • md5 : Maybe should be an md5 integrity check but it's always an empty string (maybe it's backward compatibility)
  • logo : Large logo of this modpack
    • url : Absolute URL of the logo (empty string id there is not)
    • md5 : same as logo.md5
  • background : Large image to be displayed as backgroud for this modpack
    • url : Absolute URL of a background image for this modpack (empty string if there is not)
    • md5 : same as logo.md5
  • solder : Absolute URL of the Solder server of this modpack (null if there is not)
  • discordServerId : Discord snowflake of modpack's guild on Discord (empty string if there is not)

Get latest version of the launcher

This endpoint is used to check for updates and download latest version of a laucher

GET /launcher/version/<stream>

Parameters :

  • stream : This parameter is the name of the laucher application; possible found values are :
    • stable4
    • stable
    • beta
    • beta4

Response :

{
  "build": "<string-int>",
  "url": {
    "exe": "<string-absolute-url>",
    "jar": "<string-absolute-url>",
    "osx": "<string-absolute-url>"
  },
  "resources": [
    {
      "filename": "<string>",
      "url": "<string-absolute-url>",
      "md5": "<string-md5>"
    }
  ]
}
  • build : Build version (usually number)
  • url : Absolute URLs to download a platform-specific launcher
    • exe : Absolute URL for a windows launcher
    • jar : Absolute URL for an universal JAR launcher
    • osx : Absolute URL for a MAC OS launcher zipped
  • resources : An array of required resources for the launcher (usually fonts and lib jars)
    • filename : Name of the resource file
    • url : Absolute URL for resource downloading
    • md5 : A md5 integrity check of this file

Note :

  • Parameter build is not required on this endpoint

Load homepage

An interesting endpoint not very useful but fun. This is homepage of the launcher displaying it as is.

GET /discover

Response :

A full HTML, CSS and JS page to display as homepage

Note:

  • Parameter build is not required on this endpoint

Get news feed

This endpoint list last news article of the platform

GET /news

Response :

{
  "articles": [
    {
      "id": <int>,
      "username": "<string>",
      "avatar": "<string-absolute-url>",
      "title": "<String>",
      "content": "<string-html>",
      "date": <timestamp>,
      "url": "<string-absolute-url>"
    }
  ]
}
  • articles : Array of 20 max articles
    • id : Identifier of this article
    • username : Pretty username of article's author
    • avatar : Absolute URL of author's avatar
    • title : Title of this article
    • content : Content of this article as HTML
    • date : Unix timestamp of article's publication date
    • url : Absolute URL to technic platform's page of this article

Increment modpack downloads

This endpoint increases the amount of downloads for the specified modpack

GET /modpack/<slug>/stat/install?build=<version>

Parameters :

  • version: Version of the laucher application; possible found values are :
    • stable4
    • stable
    • beta
    • beta4
    • <current version> the current launcher version you can see in the launcher application settings
  • slug: Slug of the modpack found in "Search for modpacks" endpoints

Response :

{"success":"Stat registered"}
{"error":"You are being rate-limited"}

A success message is returned when the increment was a success, an error message is shown when too many requests came from the same ip address.

Increment modpack runs

This endpoint increases the amount of runs for the specified modpack

GET /modpack/<slug>/stat/run?build=<version>

Parameters :

  • version: Version of the laucher application; possible found values are :
    • stable4
    • stable
    • beta
    • beta4
    • <current version> the current launcher version you can see in the launcher application settings
  • slug: Slug of the modpack found in "Search for modpacks" endpoints

Response :

{"success":"Stat registered"}
{"error":"You are being rate-limited"}

A success message is returned when the increment was a success, an error message is shown when too many requests came from the same ip address.

Get featured modpacks

This endpoint is not a part of the classical platform API but a part of the official Solder server of Tekkit's creators.

GET http://solder.technicpack.net/api/modpack/?include=full

This is not in scope of this document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment