Deeplink API
Deeplinks can be used to automatically launch or bring SJMCL to the foreground and perform certain actions. They are suitable for external integrations such as web pages, toolchains, and desktop shortcuts.
The protocol scheme is always sjmcl://.
NOTE
On Windows and Linux portable builds, this feature is available only after the launcher has been run at least once. On macOS, it is available only in the DMG build.
add-auth-server
Opens the Add Authentication Server dialog and automatically fills in the target third-party authentication server address.
NOTE
This interface does not directly save a new third-party authentication server. The user still needs to confirm the action in the launcher.
Format
sjmcl://add-auth-server?url=<server_url>Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Authentication server URL. Passing the root URL of an authlib-injector / Yggdrasil service is recommended |
Examples
sjmcl://add-auth-server?url=https%3A%2F%2Flittleskin.cn%2Fapi%2Fyggdrasil
sjmcl://add-auth-server?url=https%3A%2F%2Fexample.com%2Fapi%2Fyggdrasillaunch
Launches the specified instance and directly enters the launch flow. SJMCL itself also uses this endpoint to generate desktop shortcuts for launching instances.
Format
sjmcl://launch?id=<instance_id>Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Instance ID |
Parameter Notes
- In the current version, the instance ID is composed internally as
<game_directory_name>:<instance_name> - A common example is
OFFICIAL_DIR:1.20.1 - If the instance name contains spaces or other special characters, URL-encode the whole value
Examples
sjmcl://launch?id=OFFICIAL_DIR%3A1.20.1
sjmcl://launch?id=CURRENT_DIR%3AFabric%201.20.1