Create Identity
POST /v1/identities — createIdentity
import { client, Identities } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Identities.createIdentity({
body: {
source: 'https://example.com'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.identities.create_identity(
source="https://example.com",
)
print(result)
Get Identity
GET /v1/identities/{identityId} — getIdentity
import { client, Identities } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Identities.getIdentity({
path: {
identityId: 'your-identityId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.identities.get_identity(
"your-identity-id",
)
print(result)
Update Identity
PUT /v1/identities/{identityId} — updateIdentity
import { client, Identities } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Identities.updateIdentity({
path: {
identityId: 'your-identityId'
},
body: {}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.identities.update_identity(
"your-identity-id",
)
print(result)
Delete Identity
DELETE /v1/identities/{identityId} — deleteIdentity
import { client, Identities } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Identities.deleteIdentity({
path: {
identityId: 'your-identityId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.identities.delete_identity(
"your-identity-id",
)
print(result)
Reauthenticate Identity
POST /v1/identities/{identityId}/reauthenticate — reauthenticateIdentity
import { client, Identities } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Identities.reauthenticateIdentity({
path: {
identityId: 'your-identityId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.identities.reauthenticate_identity(
"your-identity-id",
)
print(result)
Start Dynamic Auth Flow
POST /v1/identities/dynamic/start/{session_id} — startDynamicAuthFlow
import { client, Identities } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Identities.startDynamicAuthFlow({
path: {
session_id: 'your-session-id'
},
body: {
url: 'https://example.com/login',
host: 'example.com'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.identities.start_dynamic_auth_flow(
"your-session-id",
url="https://example.com/login",
host="example.com",
)
print(result)
Get Dynamic Auth Flow State
GET /v1/identities/dynamic/state/{session_id} — getDynamicAuthFlowState
import { client, Identities } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Identities.getDynamicAuthFlowState({
path: {
session_id: 'your-session-id'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.identities.get_dynamic_auth_flow_state(
"your-session-id",
)
print(result)
Resolve Dynamic Auth Flow Step
POST /v1/identities/dynamic/resolve/{session_id} — resolveDynamicAuthFlow
import { client, Identities } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Identities.resolveDynamicAuthFlow({
path: {
session_id: 'your-session-id'
},
body: {
option_index: 0,
values: {
username: 'user@example.com',
password: 'secret'
}
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.identities.resolve_dynamic_auth_flow(
"your-session-id",
)
print(result)
Finalize Dynamic Auth Flow
POST /v1/identities/dynamic/finalize/{session_id} — finalizeDynamicAuthFlow
import { client, Identities } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Identities.finalizeDynamicAuthFlow({
path: {
session_id: 'your-session-id'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.identities.finalize_dynamic_auth_flow(
"your-session-id",
)
print(result)

