Solari

Profiles

A profile saves your login, your cookies and site data, so you don't have to sign in again. Log in once, attach the profile to any session, and you start already signed in.

Create a profile

const profile = await client.profiles.create({ name: "amazon-seller" })
console.log(profile.id) // "prof_abc123"

Log in from your browser

Open the profile in the console ProfilesOpen editor to drive a live browser right in your tab. Log into your sites, click through any prompts, then hit Save. This is the easy way to handle sites with 2FA or captchas.

Upload an existing login

Already have a working storageState.json from Playwright? Upload it directly:

import { readFile } from "node:fs/promises"

const storageState = JSON.parse(await readFile("./storage-state.json", "utf-8"))
await client.profiles.save(profile.id, storageState)

Attach to a session

const session = await client.sessions.create({
  profileId: "prof_abc123",
})

console.log(session.storageState?.cookies?.length, "cookies loaded")

List and delete

const profiles = await client.profiles.list()
for (const p of profiles) console.log(p.id, p.name)

await client.profiles.delete("prof_abc123")
Treat profiles like passwords
A profile holds a real login. Anyone with your API key can attach it to a session and act as that account. Keep your keys safe and use a separate key per environment.

What's inside

Profiles use Playwright's standard storageState, the same JSON that context.storageState({ path }) writes.

type StorageState = {
  cookies?: Array<{
    name: string
    value: string
    domain?: string
    path?: string
    expires?: number
    httpOnly?: boolean
    secure?: boolean
    sameSite?: "Strict" | "Lax" | "None"
  }>
  origins?: Array<{
    origin: string
    localStorage?: Array<{ name: string; value: string }>
  }>
}