APIShardX Launcher APIExtensions

Extensions

List extensions

GEThttp://127.0.0.1:40325/extensions

Returns extensions available to profiles. Use an extension id in the extensions field of POST /profiles or PATCH /profiles/{id}.

Icons are omitted because data URLs can be large. POST /extensions includes the icon of the added extension.

Authorizations
bearerAuth
Authorizationstringrequired

Permanent JWT from Settings → Automation API.

Responses
200Extension list.application/json
idstringoptional

Pass this in a profile's extensions.

namestringoptional
versionstringoptional
descriptionstringoptional
size_bytesinteger · int64optional
added_atstringoptional

@<unix_secs>.

iconstring· nullableoptional

Largest icon the manifest declares, as a data: URL. Null on the listing endpoint and on extensions that ship none.

401Missing or invalid Bearer token.
GET/extensions
GET /extensions HTTP/1.1
Host: 127.0.0.1:40325
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X GET 'http://127.0.0.1:40325/extensions' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# Permanent JWT from Settings → Automation API.
token = "YOUR_SECRET_TOKEN"

url = "http://127.0.0.1:40325/extensions"
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// Permanent JWT from Settings → Automation API.
const token = "YOUR_SECRET_TOKEN";

const url = "http://127.0.0.1:40325/extensions";

const response = await fetch(url, {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// Permanent JWT from Settings → Automation API.
	token := "YOUR_SECRET_TOKEN"

	url := "http://127.0.0.1:40325/extensions"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Permanent JWT from Settings → Automation API.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .get("http://127.0.0.1:40325/extensions")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // Permanent JWT from Settings → Automation API.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Get, "http://127.0.0.1:40325/extensions");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // Permanent JWT from Settings → Automation API.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:40325/extensions");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
200Extension list.
[
  {
    "id": "text",
    "name": "text",
    "version": "text",
    "description": "text",
    "size_bytes": 1,
    "added_at": "text",
    "icon": "text"
  }
]

Add an extension

POSThttp://127.0.0.1:40325/extensions

Provide either url or path.

url can be a Chrome Web Store page, a 32-character extension ID, or a direct .crx or .zip URL. path can be a local .crx, .zip, or unpacked folder on the launcher host.

The extension name, version, description, and icon are read from its manifest.json, including __MSG_*__ placeholders resolved with the default locale.

Authorizations
bearerAuth
Authorizationstringrequired

Permanent JWT from Settings → Automation API.

Body
application/json
urlstringoptional

A Chrome Web Store page, a bare 32-character extension id, or a direct link to a .crx / .zip.

pathstringoptional

A local .crx, .zip or unpacked folder on the launcher's machine.

Responses
200Extension added. The response includes `icon`.application/json
idstringoptional

Pass this in a profile's extensions.

namestringoptional
versionstringoptional
descriptionstringoptional
size_bytesinteger · int64optional
added_atstringoptional

@<unix_secs>.

iconstring· nullableoptional

Largest icon the manifest declares, as a data: URL. Null on the listing endpoint and on extensions that ship none.

400Neither `url` nor `path` given, the link is not an extension, or the store has no such id.application/json
errorstringrequired
401Missing or invalid Bearer token.
POST/extensions
POST /extensions HTTP/1.1
Host: 127.0.0.1:40325
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*

{
  "url": "https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch",
  "path": "text"
}
curl -X POST 'http://127.0.0.1:40325/extensions' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch","path":"text"}'
import requests

# Permanent JWT from Settings → Automation API.
token = "YOUR_SECRET_TOKEN"

url = "http://127.0.0.1:40325/extensions"
headers = {
    "Authorization": f"Bearer {token}",
}
payload = {
    "url": "https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch",
    "path": "text",
}

response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// Permanent JWT from Settings → Automation API.
const token = "YOUR_SECRET_TOKEN";

const url = "http://127.0.0.1:40325/extensions";
const payload = {
  "url": "https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch",
  "path": "text"
};

const response = await fetch(url, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${token}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"bytes"
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// Permanent JWT from Settings → Automation API.
	token := "YOUR_SECRET_TOKEN"

	url := "http://127.0.0.1:40325/extensions"
	body := bytes.NewBufferString(`{
  "url": "https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch",
  "path": "text"
}`)

	req, err := http.NewRequest("POST", url, body)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }, serde_json = "1"

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Permanent JWT from Settings → Automation API.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .post("http://127.0.0.1:40325/extensions")
        .header("Authorization", format!("Bearer {token}"))
        .json(&serde_json::json!({
          "url": "https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch",
          "path": "text"
        }))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // Permanent JWT from Settings → Automation API.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Post, "http://127.0.0.1:40325/extensions");
        request.Content = new StringContent("""
            {
              "url": "https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch",
              "path": "text"
            }
            """, Encoding.UTF8, "application/json");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // Permanent JWT from Settings → Automation API.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());
    headers = curl_slist_append(headers, "Content-Type: application/json");

    const std::string body = R"json({
  "url": "https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch",
  "path": "text"
})json";

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:40325/extensions");
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, body.c_str());
    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast<long>(body.size()));
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
{
  "id": "text",
  "name": "text",
  "version": "text",
  "description": "text",
  "size_bytes": 1,
  "added_at": "text",
  "icon": "text"
}
{
  "error": "text"
}

Remove an extension

DELhttp://127.0.0.1:40325/extensions/{id}

Profiles hold ids, not copies, so any profile naming this extension stops loading it from its next launch. Their stored list is left as it is; re-adding the extension does not restore the binding.

Authorizations
bearerAuth
Authorizationstringrequired

Permanent JWT from Settings → Automation API.

Path parameters
idstringrequired
Responses
200Removed.application/json
deletedbooleanoptional
idstringoptional
401Missing or invalid Bearer token.
DEL/extensions/text
DELETE /extensions/text HTTP/1.1
Host: 127.0.0.1:40325
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X DELETE 'http://127.0.0.1:40325/extensions/text' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# Permanent JWT from Settings → Automation API.
token = "YOUR_SECRET_TOKEN"

url = "http://127.0.0.1:40325/extensions/text"
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.delete(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// Permanent JWT from Settings → Automation API.
const token = "YOUR_SECRET_TOKEN";

const url = "http://127.0.0.1:40325/extensions/text";

const response = await fetch(url, {
  method: "DELETE",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// Permanent JWT from Settings → Automation API.
	token := "YOUR_SECRET_TOKEN"

	url := "http://127.0.0.1:40325/extensions/text"

	req, err := http.NewRequest("DELETE", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Permanent JWT from Settings → Automation API.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .delete("http://127.0.0.1:40325/extensions/text")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // Permanent JWT from Settings → Automation API.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Delete, "http://127.0.0.1:40325/extensions/text");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // Permanent JWT from Settings → Automation API.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:40325/extensions/text");
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
200Removed.
{
  "deleted": true,
  "id": "text"
}

Last updated on

On this page