An auth provider is one way to connect to a service, identified by its slug (google, google-sa, my-crm): how it signs in or which keys it takes. Its auth methods (auth_methods) follow the OpenAPI security scheme kinds: oauth2 (authorization code or client credentials), api_key and http. The credential service resolves a slug by looking up a team row first, then a platform row.
Every auth provider belongs to a company, the organization behind the service (one catalog row with name, logo and legal links). Google's five slugs all carry company: "google". The company field on an auth provider row is the company slug; the row's own slug is what Credential.provider stores.
Renamed from auth schemes (INF-1079). The
/auth-schemes…paths (includingGET /auth-schemes/hooks) are no longer served; use/auth-providers…. In the SDKsAuthSchemeDTOis nowAuthProviderDTOandAuthSchemeSpecisAuthMethod.
- Platform auth providers — OAuth providers in the catalog (Google, Slack, GitHub, Linear, and 35 others). Every catalog provider is a platform row that the platform maintains from its built-in definitions. List them with
GET /auth-providers?scope=platform. Until a platform operator sets the shared OAuth app withPUT /credentials/{provider}/app, teams connect through their own OAuth app on the provider page, the same way Microsoft works today. Operators edit seeded rows withPUT /auth-providers/{id}(workspace Admin → companies) and can still register additional platform slugs withPOST /auth-providersandscope: platformwhen a service is not in the catalog. - Team auth providers — Your own OAuth app for a slug that is not already a platform row. Register with
POST /auth-providers(defaultscope: team); client id and secret are written to the team vault. Teammates connect throughPOST /credentialslike any other OAuth provider.
Auth providers store endpoints and OAuth settings in the database. The OAuth client id and secret live in the vault ({SLUG}_CLIENT_ID, {SLUG}_CLIENT_SECRET). After a user connects, access tokens are stored under {SLUG}_ACCESS_TOKEN (slug my-crm → env prefix MY_CRM).
→ Credentials API — connect, disconnect, and GET /credentials/configs
→ Secrets API — vault keys for client credentials and tokens
Scopes
Uses the same API key scopes as credentials:
| Scope | Endpoints |
|---|---|
credentials:read | GET /auth-providers, GET /auth-providers/catalogue, GET /auth-providers/hooks, GET /auth-providers/{id} |
credentials:write | POST /auth-providers, PUT /auth-providers/{id}, DELETE /auth-providers/{id} |
Team auth providers: create, update, and delete require the team admin role (or owner) in addition to credentials:write. List and get are available to any team member with credentials:read. Callers without the role receive 403 with code team_role_required.
Platform auth providers: register, update, or delete with scope: platform requires a platform operator API key from the platform team (403 permission_denied otherwise). Listing platform rows (?scope=platform) only needs credentials:read.
List auth providers
GET /auth-providers
Team auth providers (default)
Returns every auth provider registered by the API key's team, sorted by slug ascending.
1curl https://api.inference.sh/auth-providers \2 -H "Authorization: Bearer inf_your_key"Platform auth providers
GET /auth-providers?scope=platform
Returns every platform auth provider row — 38 seeded catalog providers plus any operator-defined platform rows. Sorted by slug. Any team member with credentials:read can call this; use it to inspect endpoints, default scopes, capabilities, and vault key names before connecting or declaring requirements in inf.yml.
The first eight slugs (google, slack, discord, x, microsoft, notion, salesforce, reddit) shipped as Go OAuth providers; the other thirty were added from each service's public OAuth documentation. None of the thirty had a live platform OAuth app when they were written, so treat the first connect as the practical test.
Seeded catalog slugs (38): airtable, asana, atlassian, bitbucket, box, calendly, canva, clickup, discord, dropbox, figma, github, gitlab, google, hubspot, intercom, klaviyo, linear, linkedin, mailchimp, microsoft, miro, monday, notion, pipedrive, quickbooks, reddit, salesforce, slack, spotify, stripe, tiktok, twitch, typeform, webflow, x, xero, zoom.
1curl "https://api.inference.sh/auth-providers?scope=platform" \2 -H "Authorization: Bearer inf_your_key"Response (AuthProviderDTO[]):
| Field | Description |
|---|---|
id | Auth provider ID |
slug | Credential slug, used in /credentials/{slug}, Credential.provider, credentials: in inf.yml, and secret key prefixes |
company | Company slug the auth provider belongs to (google for google-sa). Defaults to slug |
display_name | Label shown in the vault and connect UI |
icon_url | Logo URL shown on credential cards and the provider page (see Icons and logos) |
website | Service home domain or URL (for example github.com) — used to resolve icon_url when it is empty |
description, docs_url, how_it_works | Catalogue copy for the provider page |
instructions | Markdown (links allowed) on how to get what the provider asks for. See Setup instructions |
scope | team or platform — who owns the row |
connection_scope | Default connection scope for new logins (team or user) when set on the row |
expires_after_days | For api_key providers: days a saved key counts as valid (0 = never, at most 3650). See API key lifetime |
auth_methods | Auth methods (see Auth method) |
client_id_key | Vault secret name for the OAuth client id (for example SLACK_CLIENT_ID) |
client_secret_key | Vault secret name for the OAuth client secret |
Setup instructions
instructions holds markdown (links allowed, at most 4000 characters, trimmed) for steps how_it_works cannot carry, for example "run claude setup-token and paste the token" or "ask your IT admin to approve the OAuth app". The same text is returned as:
instructionsonAuthProviderDTO(GET /auth-providers,GET /auth-providers/{id})instructionsonCredentialConfigDTO(GET /credentials/configs)action.instructionson eacherrors[]entry ofPOST /credentials/checkand of run-time 412 responses, when the requirement names the provider (connect,add_scopesandadd_secretactions)
Show instructions next to the connect or key form; use message for the one-line summary. Apps declare the same field in inf.yml (Describing the auth provider).
Icons and logos
Each auth provider row can carry an icon_url for the workspace and API catalog UI. You can set it explicitly on create or update; when you omit it but set website, the API resolves a logo for you.
Resolution order (best effort — unknown brands or lookup failures leave icon_url empty):
- Company catalog — If a company row exists for the auth provider's
slugand has an icon, that URL is used. - Logo lookup by website — Otherwise the API fetches a logo for the domain in
website(acceptsacme.comor a fullhttps://URL;www.is stripped). The same lookup path is used for companies in the credential service.
Platform seeded rows — All 38 catalog slugs include a website in the built-in definitions (for example linear.app, zoom.us). When the platform writes these rows, it looks up a logo for each row that still has no icon_url (company icon first, then logo lookup by website). A logo already stored on a row is kept.
Platform operator rows — Registering or updating a platform auth provider (scope: platform) with website and no icon_url runs the same lookup synchronously on write. When the slug is not yet in the company catalog, a company row is created (OAuth type) so other surfaces can reuse the name and logo.
Team auth providers — Registering your own with website and no icon_url borrows a logo for the card only; it does not create a platform catalog entry. Updating website on PUT /auth-providers/{id} re-runs lookup when the request leaves icon_url empty.
To use a fixed asset, set icon_url on create or update; the API does not overwrite a non-empty stored icon when you change other fields.
List auth provider hooks
GET /auth-providers/hooks
Returns the hook names an auth method may reference when declarative fields are not enough. Hooks are implemented in the API; custom team auth providers should only use names from this list (unknown names fail validation on create/update).
Response (AuthProviderHooksDTO):
| Field | Description |
|---|---|
token_response | Non-standard token response parsers (for example slack_v2) |
identity | Derive account id and display name when templates are insufficient (for example discord) |
vars | Substitute URL variables from extra app keys (for example microsoft_tenant, salesforce_host) |
auth_server_profiles | Authorization server profiles for outbound MCP OAuth (no auth provider row). Names registered in the API (today microsoft_entra for Microsoft Entra ID). The MCP connect flow picks one profile from discovered OAuth metadata (issuer host, then authorize endpoint, then token endpoint) and records it on the credential. |
1curl https://api.inference.sh/auth-providers/hooks \2 -H "Authorization: Bearer inf_your_key"Catalogue entries
GET /auth-providers/catalogue?slugs=openai,fal
Requires credentials:read. Returns platform providers as credentials: entries for an app's inf.yml, in the shape Declaring credentials uses. slugs is a comma-separated list of 1 to 100 slugs; anything else is 400 invalid_request.
| Field | Description |
|---|---|
credentials | Map of slug to entry (CredentialRequirement) |
not_in_entry | Map of slug to the row's fields that have no place in an entry (for example description). Omitted when empty |
A slug defined in API code, a team's own provider, or an unknown slug has no entry.
1curl "https://api.inference.sh/auth-providers/catalogue?slugs=openai,fal" \2 -H "Authorization: Bearer inf_your_key"MCP resource auth providers
An MCP server that needs a credential signs in through an auth provider of its own, which the API creates when the server is registered or connected. The server's registration declares that slug in credentials, and calls to the server send the caller's credential for it.
| Slug | {name}-mcp. name is the server's slug (directory or workspace registration), else the distinctive label of its host (mcp.linear.app → linear-mcp). When another auth provider already holds the slug, the API numbers it: linear-2-mcp, linear-3-mcp, … |
| Scope | platform when the public MCP directory lists the URL, so every workspace resolves the same slug. Otherwise team, so a private server's URL is never shown to another workspace. |
| OAuth servers | kind: "oauth2" from discovery: resource is the resource the server's RFC 9728 metadata names when it names this server, else the server URL; issuer, pkce: true, callback: "mcp", and a profile when the authorization server needs one. A public client is registered for the auth provider (dynamic client registration or the Client ID Metadata Document) with client_auth: "none", unless the authorization server needs an OAuth app set up by hand. |
| API-key servers | kind: "api_key" with one API_KEY field, sent as Authorization: Bearer <key>. |
| Company | company on the row is the catalog company for the server's slug or host domain (mcp.asana.com belongs to asana). |
Get auth provider
GET /auth-providers/{id}
Returns one auth provider owned by the team. Platform rows respond 403 permission_denied for non-operators. Responds 404 when the id is missing or belongs to another team.
Register auth provider
POST /auth-providers
Creates an auth provider. For team rows (default), client_id and client_secret are required and written to the team vault. For platform rows (scope: platform), omit client credentials — set the OAuth app later with PUT /credentials/{provider}/app.
The slug must be unique and must not collide with a built-in or catalog slug (otherwise 409 conflict).
Body (AuthProviderCreateRequest):
| Field | Required | Description |
|---|---|---|
slug | Yes | Lowercase letters, digits, and single hyphens (for example my-crm), max 64 characters |
display_name | Yes | Human-readable name |
auth_methods | Yes | At least one auth method (see Auth method) |
company | No | Company slug, when the auth provider is one of several for one company. Defaults to slug |
client_id | Team rows | OAuth client id — stored in the vault, not returned on later reads |
client_secret | Team rows | OAuth client secret — stored in the vault |
icon_url, website, description, docs_url, how_it_works | No | Catalogue and UI metadata; see Icons and logos |
instructions | No | Markdown setup steps, at most 4000 characters (trimmed). See Setup instructions |
expires_after_days | No | api_key providers: key lifetime in days after each save (0 or omitted = never; at most 3650) |
connection_scope | No | team or user — default scope for credentials through this auth provider |
scope | No | team (default) or platform (platform operators only) |
Example (team authorization code + PKCE):
1{2 "slug": "my-crm",3 "display_name": "My CRM",4 "auth_methods": [5 {6 "kind": "oauth2",7 "flow": "authorization_code",8 "authorization_endpoint": "https://crm.example.com/oauth/authorize",9 "token_endpoint": "https://crm.example.com/oauth/token",10 "scopes": ["read", "write"],11 "pkce": true,12 "client_auth": "basic"13 }14 ],15 "client_id": "your-client-id",16 "client_secret": "your-client-secret"17}Set company to the company slug when the auth provider is one of several for one company ("company": "acme" on acme-mcp); it defaults to the slug.
Register this redirect URI in the third-party OAuth app before connecting:
1https://app.inference.sh/settings/secrets/oauth/{slug}Use your staging or local app origin when testing outside production (same path pattern as Slack BYOK).
After registration, start OAuth with POST /credentials (or POST /integrations) using provider set to the auth provider's slug.
Update auth provider
PUT /auth-providers/{id}
Updates display fields, company (moves the row under another company), connection_scope, instructions, expires_after_days and auth_methods (AuthProviderUpdateRequest). The slug cannot change — it is the stable provider key on credentials and secrets.
A create or update body that still uses the names retired on 2026-10-17, provider or specs, is refused with 400 field_renamed naming company or auth_methods.
Optional body fields include icon_url, website, description, docs_url, how_it_works, instructions, expires_after_days and connection_scope. Setting website without icon_url triggers the same logo resolution as on create (see Icons and logos). Omit instructions to keep them and send "" to clear them; over 4000 characters answers 400 validation_error. Omit expires_after_days to keep it; 0 makes saved keys never expire.
Optional client_id / client_secret rotate vault secrets when provided (team rows). Omit them to leave stored values unchanged. Platform updates require a platform operator; team updates require team admin.
Delete auth provider
DELETE /auth-providers/{id}
Removes the auth provider and deletes its OAuth app secrets from the vault. Responds 400 validation_error when a credential for this slug is still connected — disconnect first with DELETE /credentials/{provider}.
Response:
1{ "data": { "deleted": true }, "messages": [] }Auth method
Each entry in auth_methods is an auth method (AuthMethod): one way to sign in to the slug. The kinds are the OpenAPI security scheme kinds; OAuth endpoints use the RFC 8414 names.
kind | Means | Fields |
|---|---|---|
oauth2 | A sign-in or a server-to-server grant | flow: authorization_code (default) or client_credentials; authorization_endpoint (authorization code only), token_endpoint, optional revocation_endpoint, and everything in the tables below |
api_key | One or more keys a person pastes | fields (see Pasted-key fields); optional in (header or query), param_name, value_prefix (for example Bearer ), and the fields in Hosts and key placement |
http | A pasted secret sent as an HTTP auth scheme | scheme: bearer or basic; optional bearer_format; fields (see Pasted-key fields) |
A client_credentials method has no redirect: POST /credentials exchanges the slug's client id and secret at the token endpoint and returns a connected credential at once (see Credentials API). An api_key or http method connects by saving its fields with POST /secrets and provider set to the slug, the same way catalogd API-key providers do.
Bound hosts. Any method may set hosts: the hosts its value is sent to. Each is exact (api.example.com, db.example.com:5432) or starts with a dot for every host under a domain (.example.com covers api.example.com, not example.com). With hosts, the value is bound: a run behind the egress gateway, and a sandbox, holds a placeholder and the gateway puts the value only on requests to those hosts. Without hosts, the values are plain environment variables. A sandbox login whose provider binds no hosts is refused (only credentials bound to hosts go through the gateway, and <slug> binds none).
Older names. Rows written before this change used kind: "oauth2_authorization_code", authorize_url and token_url. They are still accepted on read (and rewritten by a migration) but new requests must use the names below.
Validation (400 validation_error): at least one auth method; authorization_endpoint, token_endpoint, revocation_endpoint and userinfo_url must be https URLs; flow must be authorization_code or client_credentials; api_key and http need at least one field, with keys like ACME_API_KEY (uppercase letters, digits, underscores) and no duplicates; a field's pattern, when set, must be a valid RE2 regular expression; in needs param_name; in_body is only for api_key; hook names must be registered.
Pasted-key fields
Each entry in fields (SecretField) is one vault key a person fills in when connecting an api_key or http provider:
| Field | Description |
|---|---|
key | Vault key name (ACME_API_KEY) |
label | Form label |
placeholder | Hint text in the input, also quoted when a value is refused |
sensitive | Mask the value in the UI |
optional | The credential can connect without this key |
pattern | Optional RE2 regular expression the saved value must match, after surrounding whitespace is trimmed. A value that does not match is refused on POST /secrets and on value updates with 400 validation_error (this doesn't look like a Claude Code key; it should look like sk-ant-oat01-…), so a pasted login URL or the wrong token is caught on save instead of on the first run. Returned on GET /credentials/configs as secret_fields[].pattern |
Hosts and key placement
How a provider's keys go on a request, and the default hosts they are sent to. Each new credential copies the hosts; after that the credential's own hosts decide where its keys go. Runs hold a placeholder; the egress gateway puts the key on requests to those hosts only.
| Field | Description |
|---|---|
hosts | Default hosts every key the method binds is sent to, copied to each new credential. Each entry is a host, with its port when not the default (api.example.com, db.example.com:5432), or a dot and a domain for every host under it (.example.com). No scheme, path or *; never a top-level domain or a registry suffix (.com, .co.uk). Empty: the keys are handled like plain secrets, and each new host is asked about first |
in, param_name, value_prefix | The header or query parameter a key travels in, and a prefix for its value. None: Authorization: Bearer |
in_body | The key also goes in request bodies toward hosts. Needs hosts |
sign | Key pairs requests are signed with. The gateway signs with the real pair toward the pair's own hosts, else the method's. The secret half is never given to a run |
jwt | A token the gateway mints from the method's fields. The run holds one placeholder that leaves as the token toward hosts |
transport | h2: the API is spoken over HTTP/2 (gRPC). Needs hosts |
A new auth provider row takes every field it leaves unset from the slug's platform row when there is one, else from the platform's built-in recipe for the slug. A field the row sets stands. The copy is made once: a later change to the platform row does not reach rows already made. In the same way, a change to a row's hosts does not reach credentials already made; their owners reset them.
Bound values in a body or a gateway-signed token need an engine with egress_forms, a suffix host needs egress_host_suffix, and transport: h2 needs egress_h2 (see engine capabilities).
GET /auth-providers and GET /auth-providers/{id} add read-only bound_hosts, bound_hosts_source (row, or empty when nothing is bound) and bound_keys (the keys a run gets as placeholders) to each method. They are ignored on create and update.
Authorize and token (oauth2)
| Field | Description |
|---|---|
kind | oauth2 |
flow | authorization_code (default) or client_credentials |
authorization_endpoint | HTTPS authorization endpoint (authorization code) |
token_endpoint | HTTPS token endpoint |
revocation_endpoint | Optional HTTPS revocation endpoint, used on disconnect when revoke is not set |
scopes | Default scopes requested on connect (connect may override) |
required_scopes | Scopes always sent on connect and when adding scopes, even when the caller passes a narrower scopes list on POST /credentials. Use the auth provider's own scope names (same namespace as scopes). Typical values are the permissions the identity lookup (userinfo_url or a lookups entry) needs to resolve identifier and name, plus offline_access (or the service's refresh scope) when the defaults include it. Omit when identity comes from the token response or an endpoint any access token can call, or when the service sends no scope parameter (omit_scope_param). Built-in catalog providers set these on their platform row. |
scope_aliases | Map short scope names to the provider's scope names. Aliases are accepted on input only: requests are converted to the provider's names, which is what credentials store and the API returns |
scope_param | Query parameter name for scopes (default scope; Slack uses user_scope) |
scope_separator | Separator between scopes (default space; Slack uses comma) |
omit_scope_param | Omit the scope parameter entirely (Notion) |
pkce | Use PKCE on the authorize request (recommended) |
resource | RFC 8707 resource indicator: the protected resource the token is minted for (an MCP server's URL). Sent on the authorize, code, and refresh requests when the profile takes one |
issuer | The authorization server's RFC 8414 issuer. A callback whose iss names another issuer is refused |
authorization_response_iss_parameter_supported | With issuer, the callback must carry an iss that names it (RFC 9207) |
callback | Name of the redirect URI the OAuth app was registered with (<app>/settings/secrets/oauth/<callback>). Empty means the slug. MCP resource auth providers use mcp |
profile | An authorization server profile from auth_server_profiles in hooks, for servers that deviate from the specs. Empty means none |
client_id_param | Query/body field name for the OAuth client id (default client_id; TikTok uses client_key) |
extra_authorize_params | Query parameters appended to the authorize URL (for example Google access_type=offline) |
add_scopes_params | Parameters used when re-authorizing for more scopes |
account_hint_param | Authorize query parameter that names the connected account on add-scopes flows (Google and Microsoft use login_hint). The API sets it to the credential's account_identifier. Omitted on first connect and when the identifier is empty. |
client_auth | basic (default), body, or none — how client id/secret are sent to the token endpoint. none is a public client that sends no secret |
token_request | form (default) or json — token request body encoding |
headers | Extra HTTP headers on requests to the service; values are templates (for example Twitch Client-Id: {{client_id}}) |
scope_params | Extra authorize query parameters sent when a requested scope is present. Keys are scope names (or capability keys); values are string maps merged into the authorize URL for that connect. They override extra_authorize_params. Discord uses this for the bot scope's permissions integer. |
bot | Optional workspace bot installed by the same OAuth authorize as the person's login (Slack). Omit when the provider has no per-workspace bot. |
Workspace bot (oauth2)
Some providers install a bot user into the workspace or server the person signs in to, on the same authorize step as the user's token (Slack's scope beside user_scope). The auth method's bot field (AuthMethodBot) describes that install:
| Field | Description |
|---|---|
scope_param | Authorize parameter that carries the bot's scopes, separate from the login's (scope on Slack, while user scopes use user_scope) |
scopes | Bot scopes to request when the bot is installed. Each is prefixed with bot: in credentials and API requests (for example bot:chat:write); the prefix is stripped when values are sent in scope_param. A first connect does not install the bot unless the caller asks for bot scopes or a capability that needs them. |
token | Template path to the bot's access token in the token exchange document (Slack: {{token.bot.access_token}}). Empty when the exchange installed no bot. |
granted_scopes | Template for granted bot scopes in the token response (comma- or space-separated). Stored on the login with the bot: prefix. When empty and a bot token is present, the bot scopes that were asked for are recorded. |
hosts | Exact hosts the bot token may be sent to. Env keys that read {{bot_token}} are bound to these hosts; runs behind the egress gateway receive a placeholder until the gateway injects the token on the way out (see Slack — bot token). Empty means {{bot_token}} is a normal secret in env. |
At runtime, env entries may use {{bot_token}}: the bot token stored on the login that installed the bot, not a key on the OAuth app. Team custom providers can set bot and map {{bot_token}} in env the same way built-in Slack does.
Bot-related scopes in connect, add-scopes, and capability requests use the bot: prefix so they are distinct from the person's scopes. Declare them on capabilities in wire form (see Slack — slack.bot and Discord). A login connected before the bot existed is asked to reconnect with add_scopes when a run needs the bot.
Identity and disconnect
| Field | Description |
|---|---|
userinfo_url | HTTPS userinfo endpoint fetched with the access token (shorthand for a lookup named user) |
userinfo_url_path | JSON path inside the token response to a userinfo URL (Salesforce) |
lookups | Additional HTTP calls after the token exchange, each with name, url, optional method (GET default or POST), body, content_type, and headers. The decoded response becomes a document root named after name (for example user, resources). Lookups run after userinfo, in order. |
identifier | Template for the connected account id (for example {{user.email}}) |
name | Template for display name |
metadata | Key → template map stored on the credential |
token_response_hook | Named hook when the token response is not RFC 6749 shape |
identity_hook | Named hook when identifier/name cannot be templated |
vars_hook | Named hook to build URL variables from extra app keys |
refresh | always refreshes on every read when the service hides expiry; default refreshes near expiry |
revoke | Optional revoke endpoint on disconnect (url, style: bearer, query, or form) |
Template placeholders
URLs, headers, lookup bodies, identifier, name, metadata, and env values are strings with {{path}} placeholders (double braces). That lets JSON or GraphQL bodies contain literal { / } without being parsed as templates.
The document grows as the OAuth flow runs:
| Root | When available |
|---|---|
client_id | After authorize (and on token/lookup requests) |
vars.* and each bare var name | From the vars hook (for example {{tenant}} in Microsoft URLs) |
access_token, token.* | After the token exchange (token.* is the decoded token response) |
callback.* | Query parameters from the redirect back to inference.sh (for example QuickBooks realmId, Shopify shop) — forwarded by the app callback page into CompleteOAuth |
<lookup>.* | Each lookup response by name; user.* is the userinfo lookup |
expires_at, metadata.*, app.* | Env only: token expiry (RFC 3339), stored metadata, extra OAuth app keys named in the requirement's secrets: |
bot_token | Env only: the workspace bot token installed on the login (workspace bot); not the OAuth app's bot token |
Array elements use numeric indexes: {{resources.0.id}} (Atlassian cloud id, Xero tenant). {{a|b}} picks the first path that resolves. Lookup URLs and headers may include {{access_token}} and {{client_id}} (HubSpot token-in-URL, Twitch Client-Id).
If every placeholder in a template is empty, env/metadata entries are omitted and identifier/name render blank.
When the auth method sets identifier or identity_hook, POST /credentials/oauth/complete must produce a non-empty account from the token exchange and lookups. Otherwise the connect fails and nothing is saved (the dashboard could not show whose account it is, and incremental auth could not target the same user). A lookup that returns 401 or 403, or 200 with no matching field, counts as the service refusing identity: fix scopes or the OAuth app and reconnect. A timeout, unreachable host, 408, 429, or 5xx is temporary when the lookup URL is the auth method's own (userinfo_url or a lookup, not a URL named by the token response): the login is saved without an account, and the account is learned when the login is next used.
Examples:
- Linear — POST GraphQL lookup with a JSON body; identity from nested fields:
identifier: "{{user.data.viewer.email}}". - Dropbox — POST lookup with body
nullto the account endpoint. - QuickBooks —
metadata.realm_id: "{{callback.realmId}}"with no extra userinfo call. - Mailchimp — lookup
headersoverride the default bearer (OAuthAuthorizationheader).
Callback query parameters on OAuth complete
Some services return extra query parameters on the redirect (QuickBooks realmId, Shopify shop, and so on). Auth method templates read them as {{callback.*}} after OAuth completes.
When you call POST /credentials/oauth/complete (alias POST /integrations/oauth/complete), pass those parameters in optional params: a string map of every callback query key except code and state, which are top-level fields on the request body. The workspace OAuth callback page forwards redirect query params this way automatically.
1{2 "provider": "quickbooks",3 "type": "oauth",4 "code": "authorization_code",5 "state": "state_abc123",6 "params": {7 "realmId": "1234567890"8 }9}Omit params when the redirect carries only code and state. In @inferencesh/sdk, the generated type is CredentialCompleteOAuthRequest with optional params?: Record<string, string>.
Capabilities, app keys, and runtime env
| Field | Description |
|---|---|
capabilities | Credential capabilities (key, scopes, satisfies, display_name, description) — used by GET /credentials/configs and requirement checks |
app_keys | Extra OAuth app fields beyond client id/secret (labels and vault keys) |
env | Environment variables injected on run (defaults to {PREFIX}_ACCESS_TOKEN and expiry). Entries that reference {{app.*}} or app-only keys are rendered only when the credential requirement lists those keys in secrets:; capability-only requirements never receive another team's OAuth app signing secrets or bot tokens |
bot | Optional workspace bot installed with the sign-in (see Workspace bot) |
Validation errors use 400 with code validation_error and a descriptive detail (for example non-HTTPS URLs, an unknown kind or flow, or unknown hook names).
Declared from inf.yml
An app can carry an auth method inline under credentials.<slug>.auth in its inf.yml. It is validated at deploy with the same rules and seeds the auth provider when the slug is free. See Declaring credentials.
For an api_key slug the platform already lists, an entry may name only the keys the app uses under secrets: and put the method in auth:; take it from Catalogue entries. Every key a jwt or sign names must be in auth.fields. On a platform app's deploy, auth: fills only fields the stored method leaves unset.
Credential configs
Auth providers appear in GET /credentials/configs (and GET /integrations/configs) like every other credential slug. When the row is one the team defined, CredentialConfigDTO includes auth_provider_id (the auth provider's id) so the workspace UI can edit or remove it.
Resolution for connect and runtime uses the registry (non-OAuth slugs such as google-sa, gcp, and MCP) then team auth provider → platform auth provider (platform rows are cached briefly on each API instance).
Connected accounts use the same CredentialDTO fields as other OAuth credentials. Use the auth provider's slug as provider in apps, agents, and POST /credentials/check.
Related vault keys
For slug my-crm:
| Secret key | Purpose |
|---|---|
MY_CRM_CLIENT_ID | OAuth client id (written at registration) |
MY_CRM_CLIENT_SECRET | OAuth client secret |
MY_CRM_ACCESS_TOKEN | Access token after a user connects (managed by the platform) |
Apps and agents read the access token from the environment using the {PREFIX}_ACCESS_TOKEN name when the credential is declared in inf.yml.