Where the credentials come from
- API key - created in your Engini account settings at app.engini.io. Sign in to the app however you like - email/password or OAuth (Google, Microsoft, GitHub) - then create a key. The CLI’s
engini loginopens this page for you on a TTY. - Bearer JWT - the session token Engini issues when you sign in (including via the OAuth providers above). It’s what the web app itself uses; you can pass it to the SDK (
token=) or API for short-lived, user-scoped calls. - OAuth apps - third-party applications (and MCP clients) can obtain Engini Bearer tokens programmatically through the standard OAuth 2.1 authorization-code flow: see OAuth apps.
OAuth sign-in to Engini happens in the browser/web app - there is no OAuth device flow inside the CLI or SDK. For anything long-lived or headless, use an API key. (OAuth to third-party applications - Salesforce, Outlook, Gmail… - is a different flow and is fully supported programmatically: see Connections & OAuth.)
Base URL
Verify a credential
client.auth.whoami(), the CLI as engini whoami.
In the SDKs
api_key/token/auth are mutually exclusive. With no explicit credential, the SDKs read ENGINI_API_KEY first, then ENGINI_API_TOKEN.
Failures
Missing or invalid credentials return401; a valid credential without access to the resource returns 403. Both carry the standard error envelope.