babelforce manager SDK
First-class, intuitive clients for the babelforce manager APIs — auth, user & agent management, call reporting, metrics, and task automations — in TypeScript, Go, and Rust.
One client, configured once, exposes resource namespaces over the API. Authentication, paging, and error handling are taken care of for you. The three SDKs stay at full parity — every manager operation is wrapped identically in TypeScript, Go, and Rust.
Install
- TypeScript
- Go
- Rust
npm install @babelforce/manager-sdk
go get github.com/babelforce/manager-sdk-go
cargo add babelforce-manager-sdk
A first call
- TypeScript
- Go
- Rust
import { ManagerClient } from "@babelforce/manager-sdk";
const mgr = await ManagerClient.connect({
auth: { kind: "clientCredentials", clientId, clientSecret },
});
for await (const user of mgr.users.list()) {
console.log(user.email);
}
mgr, _ := manager.Connect(ctx, manager.Options{
Auth: manager.ClientCredentials(clientID, clientSecret),
})
for user, err := range mgr.Users.List(ctx, manager.ListUsersQuery{}) {
if err != nil { log.Fatal(err) }
fmt.Println(user.Email)
}
use babelforce_manager_sdk::{Auth, ManagerClient};
let mgr = ManagerClient::connect(Auth::ClientCredentials {
client_id, client_secret,
}).await?;
for user in mgr.users.list_all().await? {
println!("{}", user.email);
}
What's inside
- One host, two API versions. Everything lives on a single host —
https://services.babelforce.comby default; the SDK hides the/api/v2vs/api/v3split. Point at another host with abaseUrloverride. - Auth, configured once — OAuth2 client credentials or password grant, or a bearer token you already hold; tokens are refreshed transparently in TypeScript and Go.
- Typed errors — non-2xx responses raise a single typed error with status, code, and body.
- Auto-pagination — list endpoints page for you.
- Automatic retries — transient failures (429/502/503/504, network blips) are retried with
exponential backoff, honouring
Retry-After. On by default; configurable per client.