Skip to main content
Connected Apps let a user link a third-party account once — GitHub, Google, Slack, Microsoft, and the rest of the org’s enabled providers — and then every tool that needs that provider just works. Runtools mints and refreshes the token server-side at call time; the access token never passes through your code or an agent’s prompt. If you are building a product on Runtools and your product’s users need to connect their own accounts, use Hosted Connect instead. Connected Apps are for the authenticated Runtools user or org; Hosted Connect is for app-scoped customer connections such as atlas + customer_123 + gmail. The provider catalog comes from GET /v1/oauth/providers. Most providers use a browser redirect flow. openai-codex uses a device-code flow when it is enabled.
Raw OAuth token retrieval is internal-only service plumbing. Use connection management helpers and hosted tool execution instead of building your own token exchange or token storage.

Connect With The CLI

The CLI supports browser redirect providers such as github, google, slack, discord, microsoft, linkedin, and x. Use custom scopes when needed:

Connect With The SDK

How Tools Use Connections

When you run a Tool Hub action, RunTools resolves credentials in this order and only fills missing required credential fields:
  1. Per-request credentials
  2. credentialOverrides that point at stored secrets
  3. Stored credentials for the installed tool
  4. Matching user or org secrets
  5. Connected OAuth account for the tool’s provider
Secret fallbacks use normalized names. For example, a required field named apiKey maps to the secret name APIKEY; use credentialOverrides when you want a different secret name.
If multiple accounts are connected for the same provider, execution uses the user’s default connection unless you pass an account selector. The selector can be a human-readable email, username, display name, provider account ID, or exact connection ID from Connected Apps:
Agents receive optional connected_account and connected_connection_id inputs on OAuth-backed tools. Prefer connected_account so the model can use labels users naturally mention, such as an email address or GitHub username.

BYOA Provider Configs

Bring-your-own-app configs let an organization use its own OAuth client for a provider. Creating, listing, updating, or deleting provider configs requires credential-admin access.
When a BYOA config is enabled, OAuth start uses the organization’s client ID, client secret, and custom scopes. If it is absent or disabled, RunTools falls back to the platform provider configuration when that provider is registered.
cURL

Custom Tools

Custom tools declare OAuth needs in their credential spec. RunTools maps the connected provider token into the credential field before running the tool.
tools/my-google-tool.ts
If a tool has an OAuth credential spec and no matching connection exists, hosted execution reports the missing credential through the normal tool execution error path. The caller never receives the provider access token directly.

API Reference

Internal services also call /v1/oauth/token/{provider} and /v1/oauth/export/{provider} with internal scopes. Those endpoints are not public customer APIs.