- Store authenticated sessions and identities, allowing to stay logged in to websites
- Improve overall speed and performance
Quick start - Create and use a profile
Hide Via SDK
Hide Via SDK
1
Start a session with a new profile
Create a session via SDK, Make sure to configure the new profile to persist.
Copy
Ask AI
import Anchorbrowser from "anchorbrowser";
(async () => {
const anchorClient = new Anchorbrowser()
const session = await anchorClient.sessions.create({
browser: {
profile: {
name: 'new-profile',
persist: true
}
}
})
console.log(session)
})();
2
Authenticate Once
Authenticate to the target service and create a browser context with the required cookies and session data.
Copy
Ask AI
import Anchorbrowser from "anchorbrowser";
(async () => {
const anchorClient = new Anchorbrowser()
const session = await anchorClient.sessions.create({
browser: {
profile: {
name: 'new-profile',
persist: true
}
}
})
const sessionId = session.data.id;
// Navigate to the login page
await anchorClient.sessions.goto(sessionId, {
url: 'https://example.com/login'
})
// Fill in your login credentials
await anchorClient.sessions.mouse.click(sessionId, { x: 100, y: 200 })
await anchorClient.sessions.keyboard.type(sessionId, { text: 'your-username' })
await anchorClient.sessions.mouse.click(sessionId, { x: 100, y: 250 })
await anchorClient.sessions.keyboard.type(sessionId, { text: 'your-password' })
// Submit the login form
await anchorClient.sessions.mouse.click(sessionId, { x: 100, y: 300 })
console.log('Authentication completed. Profile will be saved when session ends.')
})();
3
Save Profile
End the session. The profile will be automatically saved since you set
persist: true when creating the session.Copy
Ask AI
import Anchorbrowser from "anchorbrowser";
(async () => {
const anchorClient = new Anchorbrowser()
// After completing authentication, end the session to save the profile
await anchorClient.sessions.delete(sessionId)
console.log('Session ended. Profile "new-profile" has been saved.')
})();
4
Use the profile in other sessions
Now, when creating a new session pass the
profile parameter with the name of the profile you created to load the saved browser context.Copy
Ask AI
import Anchorbrowser from "anchorbrowser";
(async () => {
const anchorClient = new Anchorbrowser()
const session = await anchorClient.sessions.create({
browser: {
profile: {
name: 'new-profile'
}
}
})
console.log(session)
})();
Hide Via UI
Hide Via UI
1
Start a session with a new profile
Through the Anchor playground, create a profile on the configuration area. Then, click to start a session.

2
Authenticate Once
Authenticate to the target service using the playground to create a browser context with the required cookies and session data.
3
Save Profile
Save the profile using the ‘Save Profile’ button in the Anchor Browser Playground.

Then approve it in the popup window ‘Yes, Save and Terminate’
This operation will end the current playground browser session


4
Use the profile in other sessions
Select the saved profile from the dropdown in the playground configuration area when starting a new session.


