Skip to content
Local environment Preproduction — not production data

FactorialClient

Every App workspace ships with FactorialClient, a production-grade client for the Factorial API — pagination, OAuth, and error handling are built in, so there is nothing to set up. It is available through base-app via fcode.import(...).

Factorial publishes API SDKs in both JavaScript and Python that back the client — your App uses the one matching its language. Build on these for all Factorial API access — don’t hand-roll HTTP calls. The source lives in factorialco/factorial-api-sdks:

The SDKs ship their own Agent Skill, so your coding assistant knows how to call the API correctly — see factorial-api-sdks/SKILL.md.

const { FactorialClient } = fcode.import("FactorialClient");
const client = await FactorialClient.create();
// The API token for the current workspace is injected automatically — see OAuth & API token.
const employees = await client.employees.list();
for (const employee of employees) {
console.log(employee.full_name);
}

The credentials the client uses are provisioned per workspace — you don’t manage them yourself. See OAuth & API token.