DiceLogin

Automation

Local API

Start and stop profiles from your own scripts with Puppeteer, Playwright or Selenium.

Turn it on

DiceLogin desktop app → Settings → Automation → Local API. It is off by default. When on, it listens on http://127.0.0.1:17900 (port can be changed) and only programs on the same computer can reach it.

Every request needs the API key from that page:

HTTP
Authorization: Bearer <API key>

DiceLogin must be open and signed in. Requests run in the team currently selected in the app, with your role and group access, and they use the same profile locks as the app (a profile open on another computer answers 409 unless you send "force": true).

Endpoints

MethodPathBody / queryReturns
GET/api/v1/status—version, signedIn
GET/api/v1/profiles?group=<name or id>&q=<text>profile_id, name, browser, os, group, tags, proxy, running_here, open_on
POST/api/v1/browser/start{ "profile_id": "...", "force": false, "headless": false, "pin": "1234" }ws_endpoint, debug_port, protocol (cdp for DiceCore, webDriverBiDi for DiceFox); already_open: true if the API had already started it
POST/api/v1/browser/stop{ "profile_id": "..." }stopped
GET/api/v1/browser/status?profile_id=...running, ws_endpoint, protocol

Create, change and delete — passed on to DiceLogin with your account, so your role in the team and the plan's limits apply. The bodies are the same as the cloud API.

MethodPath
POST/api/v1/profiles
GET, PATCH, DELETE/api/v1/profiles/{id}
GET/api/v1/profiles/{id}/activity
GET, POST/api/v1/groups
PATCH, DELETE/api/v1/groups/{id}
GET, POST/api/v1/proxies
PATCH/api/v1/proxies/{id}
POST/api/v1/proxies/bulk-delete

Headless: "headless": true opens the profile without a window. Its user-agent, proxy, time zone and other settings are the same as with a window. A headless profile shows as Running (headless) in the app.

Responses are { "success": true, "data": ... } or { "success": false, "error": { "code", "message" } }.

StatusCodeMeaning
401UNAUTHORIZEDmissing or wrong API key
403FORBIDDENcalled from a web page, or with a host other than 127.0.0.1 / localhost
409OPEN_ON_ANOTHER_COMPUTERsomeone has this profile open; retry with "force": true to take it over
409OPEN_WITHOUT_AUTOMATIONthe profile was opened by hand in DiceLogin; stop it first
423PIN_REQUIREDthe profile has a PIN; send it as "pin": "1234" in the start request
403WRONG_PINthe PIN isn't right
429PIN_LOCKED5 wrong PINs; wait 15 minutes
422LAUNCH_FAILEDthe browser could not start (e.g. the proxy is down)
503APP_NOT_READYDiceLogin isn't open or signed in

Start a profile

Starting a profile gives you ws_endpoint (and debug_port) to connect your script to:

curl -X POST http://127.0.0.1:17900/api/v1/browser/start \
  -H "Authorization: Bearer $DICELOGIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "profile_id": "PROFILE_ID" }'

Drive it with your script

Connect to the profile that is already running — don't launch a new browser. Its cookies, sign-ins, proxy and fingerprint are already in place.

import puppeteer from "puppeteer-core";

const browser = await puppeteer.connect({ browserWSEndpoint: data.ws_endpoint, defaultViewport: null });
const page = await browser.newPage();
await page.goto("https://example.com");

await browser.disconnect(); // the profile keeps running

Stop a profile

curl -X POST http://127.0.0.1:17900/api/v1/browser/stop \
  -H "Authorization: Bearer $DICELOGIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "profile_id": "PROFILE_ID" }'

DiceFox (Firefox) profiles

DiceFox is driven with WebDriver BiDi: protocol is webDriverBiDi and ws_endpoint looks like ws://127.0.0.1:PORT/session.

Puppeteer
import puppeteer from "puppeteer-core";

const browser = await puppeteer.connect({ browserWSEndpoint: data.ws_endpoint, protocol: "webDriverBiDi" });

Selenium 4 can use the same endpoint through its BiDi support. Playwright can't drive DiceFox: it only works with its own patched Firefox. Use DiceCore profiles with Playwright.

Limits

  • The automation port the browser opens is bound to 127.0.0.1 and exists only while that profile runs.
  • To open profiles from another machine, use the cloud API with remote control on. Scripts that drive the browser still run on this computer.