Anchor allows you to save an existing browser state as “profiles” for use in future browser sessions. This feature enables users to:
  • Store authenticated sessions and identities, allowing to stay logged in to websites
  • Improve overall speed and performance
The following guide explains how to create and use Identity Profiles in Anchor Browser.

Quick start - Create and use a profile

1

Start a playground session with a proflie

Through the Anchor playground, create a profile on the configuration area. Then, click to start a session.
OR
create-session via SDK (or API) while configuring the new profile to persist
import { Anchorbrowser } from "anchorbrowser";

(async () => {
 const anchor_client = new Anchorbrowser()
 const session = await anchor_client.sessions.create({
    browser: {
        name: 'new-profile',
        persist: true
        }
    })
 console.log(session)
})();
2

Authenticate Once

Authenticate to the target service using the playground or the Live URL of the session to create a browser context with the required cookies and session data.
3

Save Profile

Playground

Save the profile using the ‘Save Profile’ button in the Anchor Browser Playground.

Live URL

End the session using the Session History page.
This operation will end the current playground browser session
4

Use the profile in other sessions

Now, when using the create session API, pass the profile parameter with the name of the profile you created to load the saved browser context.
import { Anchorbrowser } from "anchorbrowser";

(async () => {
 const anchor_client = new Anchorbrowser()
 const session = await anchor_client.sessions.create({
    browser: {
        name: 'new-profile'
        }
    })
 console.log(session)
})();
For additional capabilities and advanced use cases, refer to the API documentation for profiles.