AgenTrux OAuth API
The oauth API from AgenTrux — 7 operation(s) for oauth.
The oauth API from AgenTrux — 7 operation(s) for oauth.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/agentrux-com:agentrux-com-oauth-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: AgenTrux OAuth API
version: 0.1.0
tags:
- name: OAuth
paths:
/oauth/authorize:
get:
tags:
- OAuth
summary: Authorize
description: authorization_code 発行 → redirect_uri へ 302.
operationId: authorize_oauth_authorize_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
/oauth/token:
post:
tags:
- OAuth
summary: Token
description: 'OAuth 2.1 token endpoint。grant_type で 3 経路に分岐.
- `authorization_code`: SPA / device flow 由来 (Phase 1.4 / 1.5、aat_ + art_)
- `client_credentials`: headless script 由来 (Phase 1.9b、crd_/aks_ → aat_)
- `refresh_token`: art_ rotation (Phase 1.10b、authorization_code 由来のみ)
- `device_code`: RFC 8628。標準クライアントは URN
(`urn:ietf:params:oauth:grant-type:device_code`) を送るため、 dispatch 前に
canonical_grant_type() で内部短縮形へ正規化する (discovery は URN を
advertise するのに token endpoint が拒否していた不整合の根治。 DCR の
正規化と同じ alias 表 = application/oauth/grant_types.py を SSOT に共有)。
その他の grant_type は unsupported_grant_type で reject。'
operationId: token_oauth_token_post
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_token_oauth_token_post'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/oauth/revoke:
post:
tags:
- OAuth
summary: Revoke
description: 'token revocation (RFC 7009).
refresh_token (art_*) のみ実 revoke。access_token (aat_*) は短命前提で no-op。
成功・失敗ともに 200 OK (RFC 7009 §2.2)。invalid_client のみ 401。'
operationId: revoke_oauth_revoke_post
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_revoke_oauth_revoke_post'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/oauth/introspect:
post:
tags:
- OAuth
summary: Introspect
description: 'token introspection (RFC 7662).
Resource server credential が必須 (oauth_server.md §3-2)。
OAuth client credential とは別の信頼境界 (Codex Phase 1.6 plan review)。'
operationId: introspect_oauth_introspect_post
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_introspect_oauth_introspect_post'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/oauth/userinfo:
get:
tags:
- OAuth
summary: Userinfo
description: 'OIDC UserInfo endpoint (Phase 1.7c、 RFC 6749 §3 + OIDC Core §5.3).
Bearer aat_ を受け取り、 openid scope を含む場合のみ identity claim 返す。
aat_ の scope 確認 (openid 必須)、 sub は user_id (id_token と一致)、 email は
users.kratos_identity_id 経由で kratos identity から取得 (今は DB に email 列が
無いので primary_account.display_name を fallback、 Phase 4 で正式 email 連携)。
SSOT: docs/04_design/auth/oauth_server.md §3-9 (Phase 1.7c で section 新設)'
operationId: userinfo_oauth_userinfo_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
/oauth/consent/{request_id}:
get:
tags:
- OAuth
summary: Get Consent Request
description: 'consent picker SPA が表示用詳細を取得 (W.2.1 scaffold)。
cross-tenant URL (他人の request_id) は user_id mismatch で 404 隠蔽 (A4 不変条件)。
Codex W.2.1 review #6 反映:
- response に source / owner_account_id / owner_alias_id / delegation_id を含める
- approve 時に SPA が UI で「課金は owner 側」 を表示できる材料を残す
- W.2.1 scaffold ではこれらは null (approve flow が W.2.2 で確定保存するまで)'
operationId: get_consent_request_oauth_consent__request_id__get
parameters:
- name: request_id
in: path
required: true
schema:
type: string
title: Request Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/oauth/consent/{request_id}/decision:
post:
tags:
- OAuth
summary: Post Consent Decision
description: 'consent decision (W.2.2 本実装、 approve + deny 両 path)。
検証順序 (Codex W.2.2 review #4: cross-tenant 404 隠蔽担保):
1. body Pydantic validation (decision=approve|deny)
2. (approve) selected_* の構造検証 (構造異常 → 400、 ID 系の参照は後段)
3. find_active_by_id で user_id 一致 → 404 隠蔽 (cross-tenant / expired / consumed / denied)
4. selected_scope ⊆ requested_scope (vocab subset)
5. selected_script_id の own/delegated 判定 (Codex #2: Phase 1.9c と同 UNION query)
6. aggregate_script_capabilities で cap 検証 (Codex #1: vocab 上限)
7. approve_with_lineage で atomic state-conditional UPDATE (Codex #3: race-safe)
8. authorization_code 発行 (同 TX、 redirect_uri に code/state)'
operationId: post_consent_decision_oauth_consent__request_id__decision_post
parameters:
- name: request_id
in: path
required: true
schema:
type: string
title: Request Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/_ConsentDecisionBody'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
Body_introspect_oauth_introspect_post:
properties:
token:
type: string
title: Token
token_type_hint:
type: string
title: Token Type Hint
default: ''
client_id:
type: string
title: Client Id
default: ''
client_secret:
type: string
title: Client Secret
default: ''
type: object
required:
- token
title: Body_introspect_oauth_introspect_post
_ConsentDecisionBody:
properties:
decision:
type: string
pattern: ^(approve|deny)$
title: Decision
selected_script_id:
anyOf:
- type: string
- type: 'null'
title: Selected Script Id
selected_scope:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Selected Scope
type: object
required:
- decision
title: _ConsentDecisionBody
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
Body_revoke_oauth_revoke_post:
properties:
token:
type: string
title: Token
token_type_hint:
type: string
title: Token Type Hint
default: ''
client_id:
type: string
title: Client Id
default: ''
client_secret:
type: string
title: Client Secret
default: ''
type: object
required:
- token
title: Body_revoke_oauth_revoke_post
Body_token_oauth_token_post:
properties:
grant_type:
type: string
title: Grant Type
code:
type: string
title: Code
default: ''
redirect_uri:
type: string
title: Redirect Uri
default: ''
client_id:
type: string
title: Client Id
default: ''
client_secret:
type: string
title: Client Secret
default: ''
code_verifier:
type: string
title: Code Verifier
default: ''
scope:
type: string
title: Scope
default: ''
refresh_token:
type: string
title: Refresh Token
default: ''
device_code:
type: string
title: Device Code
default: ''
resource:
type: string
title: Resource
default: ''
type: object
required:
- grant_type
title: Body_token_oauth_token_post