Dashboard

Profiles Service

Manage browser profiles that persist cookies, localStorage, and other browser state across sessions.

Methods

create(name)

Create a new browser profile.

const profile = await client.profiles.create('my-profile');
console.log(profile.id);

list()

List all profiles.

const profiles = await client.profiles.list();

for (const p of profiles) {
  console.log(p.id, p.name);
}

get(id)

Get profile details.

const profile = await client.profiles.get('profile-id');
console.log(profile.name, profile.createdAt);

delete(id)

Delete a profile.

await client.profiles.delete('profile-id');

Response Type

interface ProfileResponse {
  id: string;
  name: string;
  createdAt: string;
  updatedAt: string;
}

Using Profiles with Sessions

// Create profile
const profile = await client.profiles.create('login-session');

// Use in browser session
const { browserWSEndpoint } = await client.browser.create({
  profileId: profile.id,
  profilePersist: true, // Save state when session closes
});

// Connect and login... browser state is saved

// Reuse profile in another session
const { browserWSEndpoint: ep2 } = await client.browser.create({
  profileId: profile.id,
  profilePersist: true,
});
// This session starts with cookies/localStorage from last session

Profile Data

Profiles store: