Stop building OAuth flows, token refresh logic, and credential storage. Ship agents instead.
API Keys
Long-lived credentials using HTTP Basic Auth. Managed from the dashboard, shown once, store securely. Built for server-to-server integrations.
Scoped Permissions
Four scopes: Full AccessRead OnlyAccountsActions. Least-privilege by default. Fine-grained scopes available for tighter control.
Per-User Credential Isolation
Every connection is scoped to a user via origin_owner_id. Credentials are isolated, encrypted at rest. Multi-tenant by default.
Automatic Token Refresh
When a request hits a 401, StackOne refreshes the token, updates stored credentials, and retries the original action. Your agent never sees the failure.
Every Auth Method
OAuth 2.0API KeysBasic AuthBearer configured per connector automatically. You don't pick the method. StackOne handles it.
StackOne Connect Hub
Embeddable auth UI for your end users. One POST /sessions returns an auth link. Your user picks a provider, logs in, and StackOne creates the account. No OAuth callbacks to build.
OAuth for AI agents, explained: how applications and authorizations work for agentic execution in production, and why owning your own OAuth app matters.
5 min read
AI Agent Authentication FAQ
OAuth token refresh for AI agents is handled automatically. When a request returns a 401, the auth layer refreshes the token, updates stored credentials, and retries the original action. The agent never handles refresh logic directly. See the full OAuth flow for AI agents for how applications and authorizations fit together.
Multi-tenant authentication isolates credentials per user so each customer's OAuth tokens and connections are completely separate. Each connection is scoped to an origin_owner_id. No shared service accounts, no cross-tenant data access. Essential for production agent deployments serving multiple customers.
AI agents typically need OAuth 2.0 for user-authorized access, API keys for server-to-server calls, and Basic Auth or Bearer tokens depending on the provider. The required method varies by provider. Ideally, the auth layer selects the correct method per connector automatically rather than requiring per-provider configuration.
Session tokens are best for agent workflows where time-bounded access reduces risk. They expire after a configurable period (default 30 minutes) and are scoped to one account. API keys are better for persistent backend integrations. Use session tokens when your agent runs on behalf of end users.
When a provider revokes OAuth access, subsequent API calls return a 412 status (account suspended or expired). The auth layer stops retrying. You'll need to prompt the user to re-authenticate through a new connect session. Auth links expire after 30 days.
Authentication across MCP and REST uses the same connected account. For REST, pass x-account-id as a header. For MCP, use ?x-account-id= as a query parameter. No additional credential configuration per protocol.
By default, each connect session creates one account per origin_owner_id. Users cannot share connections. Credentials are isolated per user. To allow a single user to connect multiple accounts from the same provider, enable the multiple parameter in the connect session request.
Stop building auth.
Start shipping agents.
StackOne handles OAuth, token refresh, and credential storage for 450+ connectors. Start free in minutes.