Common use cases
| Use case | Description |
|---|---|
| Internal services | Access private dashboards and endpoints using certificates signed by your organization’s CA |
| Dev/staging environments | Connect to environments with self-signed or private CA certificates |
| mTLS authentication | Validate server certificate chains in mutual TLS setups |
| QA/testing | Run automated tests with temporary CAs or simulated certificate chains |
| Enterprise networks | Support environments with custom trust policies or air-gapped infrastructure |
Managing certificates
Certificates are managed at the team level. Upload a certificate once, then reference it by name in any session.Upload a certificate
import { client, Certificates } from 'anchorbrowser';
import fs from 'fs';
client.setConfig({ auth: () => process.env.ANCHOR_API_KEY });
const certificate = await Certificates.createCertificate({
body: {
file: fs.createReadStream('/path/to/your-ca.crt'),
name: 'my-internal-ca',
description: 'CA for internal services',
},
});
console.log('Certificate uploaded:', certificate);
import os
from anchorbrowser import Anchorbrowser
anchor_client = Anchorbrowser(api_key=os.getenv('ANCHOR_API_KEY'))
with open('/path/to/your-ca.crt', 'rb') as f:
certificate = anchor_client.post(
'/v1/certificates',
body={
'file': f,
'name': 'my-internal-ca',
'description': 'CA for internal services',
},
)
print('Certificate uploaded:', certificate)
| Parameter | Required | Description |
|---|---|---|
file | Yes | Certificate file (.crt, .pem, .cer, .der) |
name | Yes | Unique identifier (alphanumeric, hyphens, underscores) |
description | No | Optional description (max 1000 characters) |
List certificates
import { client, Certificates } from 'anchorbrowser';
client.setConfig({ auth: () => process.env.ANCHOR_API_KEY });
const certificates = await Certificates.listCertificates();
console.log('Certificates:', certificates);
import os
from anchorbrowser import Anchorbrowser
anchor_client = Anchorbrowser(api_key=os.getenv('ANCHOR_API_KEY'))
certificates = anchor_client.get('/v1/certificates')
print('Certificates:', certificates)
Delete a certificate
import { client, Certificates } from 'anchorbrowser';
client.setConfig({ auth: () => process.env.ANCHOR_API_KEY });
const response = await Certificates.deleteCertificate({
path: {
name: 'my-internal-ca',
},
});
console.log('Deleted:', response);
import os
from anchorbrowser import Anchorbrowser
anchor_client = Anchorbrowser(api_key=os.getenv('ANCHOR_API_KEY'))
response = anchor_client.delete('/v1/certificates/my-internal-ca')
print('Deleted:', response)
Using a certificate
After uploading a certificate, reference it by name when creating a session:import { client, Sessions } from 'anchorbrowser';
client.setConfig({ auth: () => process.env.ANCHOR_API_KEY });
const session = await Sessions.createSession({
body: {
browser: {
ca_cert: {
active: true,
name: 'my-internal-ca',
},
},
},
});
console.log('Session:', session.data.id);
import os
from anchorbrowser import Anchorbrowser
anchor_client = Anchorbrowser(api_key=os.getenv('ANCHOR_API_KEY'))
session = anchor_client.sessions.create_session(
browser={
'ca_cert': {
'active': True,
'name': 'my-internal-ca',
},
},
)
print('Session:', session.data.id)
Related capabilities
Proxy
Route traffic through proxies for network control.
Authentication
Persistent identity for seamless access to applications.

