Use this when you persist sessions yourself and want a new process to
resume without calling auth.login() again. Pass previously stored
tokens directly into createClient.
Options
token
string
optional
JWT bearer token to use for authenticated requests.
refreshToken
string
optional
Refresh token used for automatic token recovery on 401 responses.
timeoutMs
number
optional
Per-request timeout in milliseconds.
Default:30000
retry
{ retries?: number; delayMs?: number }
optional
Retry policy for idempotent requests that fail with transient network or 5xx errors.
When a request receives 401 and a refresh token is available, the SDK calls
/token/refresh, updates the in-memory session, and retries the original
request once. Concurrent refreshes are coalesced — several simultaneous 401
responses only trigger one refresh request.
Completes an OTP challenge for accounts where Linxio requires a one-time
code after the initial login. Linxio's integration notes recommend
disabling OTP for machine users to avoid this step.
Method parameters
email
string
required
Email address for the Linxio user completing the OTP challenge.
code
string
required
One-time code delivered by Linxio to the user's registered device.
Do not commit credentials. Prefer environment variables, a secret manager, or
your deployment platform's encrypted environment configuration.
Recommended credential pattern
const linxio = createClient();await linxio.auth.login({ email: process.env.LINXIO_EMAIL!, // from env, not source password: process.env.LINXIO_PASSWORD!, // from env, not source});