Skip to content

SOP 008: Browser Profiles

Fresh
FieldValue
SOP IDSOP-008
Version1.0
StatusActive
SourceSteel Profiles API

Overview

Persist complete browser state (auth, cookies, extensions, credentials, settings) across sessions using profiles. Think of it as saving a browser identity.

Prerequisites

  • Steel account with API key
  • steel-sdk installed

Profile Lifecycle

Procedure

Step 1: Create Session with Profile Persistence

typescript
const firstSession = await client.sessions.create({
  persistProfile: true
});

// Do your browsing, login, etc.
// Profile is saved when session releases

Step 2: Reuse Profile in New Session

typescript
const secondSession = await client.sessions.create({
  profileId: firstSession.profileId
});
// Starts with same cookies, auth, extensions, settings!

Step 3: Update Profile with New Data

typescript
// Pass both profileId AND persistProfile to accumulate state
const thirdSession = await client.sessions.create({
  profileId: firstSession.profileId,
  persistProfile: true
});
// New browsing data will be saved to the profile

Step 4: Manual Profile Management

typescript
// Create profile manually with custom data
await client.profiles.create({
  userDataDir: fs.readFileSync('path/to/userDataDir.zip'),
  userAgent: 'Mozilla/5.0 ...'
});

// Update profile metadata
await client.profiles.update(profileId, {
  userAgent: 'Mozilla/5.0 (updated)...'
});

Limits

ConstraintValue
Max profile size300 MB
Auto-deletionAfter 30 days unused
Failed uploadsProfile set to FAILED state, unusable

Profile States

StateDescription
UPLOADINGProfile being created, session still active
READYProfile saved, available for use
FAILEDUpload failed (usually > 300 MB), cannot be used

Verification Checklist

  • [ ] Session created with persistProfile: true
  • [ ] Profile ID returned in session response
  • [ ] New session with profileId starts with saved state
  • [ ] Cookies and auth persist across sessions
  • [ ] Profile size under 300 MB limit

Troubleshooting

IssueSolution
Profile in FAILED stateReduce profile size (< 300 MB), create fresh
Auth not persistingEnsure persistProfile: true on the session where you logged in
Profile auto-deletedUse profile within 30 days to prevent cleanup
Stale profile dataCreate new session with both profileId and persistProfile: true

See Also

SOP Documentation Hub - Built from Steel.dev Official Docs