treg.to OAuth API

The Oauth API from treg.to — 4 operation(s) for oauth.

GitHub OpenAPI

Operations 4

GET /oauth/providers Oauth Providers List #
POST /oauth/start Oauth Start #
GET /oauth/callback Oauth Callback #
GET /oauth/status/{state} Oauth Status #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/treg-to:treg-to-oauth-api"
All apis
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.

Get an API 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 Specification

treg-to-oauth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: treg OAuth API
  version: 0.0.1
tags:
- name: OAuth
paths:
  /oauth/providers:
    get:
      summary: Oauth Providers List
      description: 'Providers treg holds its own approved app for. `configured` is false when this deployment

        hasn''t set that provider''s client credentials — listed, but its flow can''t run here.'
      operationId: oauth_providers_list_oauth_providers_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  additionalProperties: true
                  type: object
                type: array
                title: Response Oauth Providers List Oauth Providers Get
      tags:
      - OAuth
  /oauth/start:
    post:
      summary: Oauth Start
      operationId: oauth_start_oauth_start_post
      parameters:
      - name: x-treg-token
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Token
      - name: x-treg-org
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Org
      - name: treg_session
        in: cookie
        required: false
        schema:
          type: string
          default: ''
          title: Treg Session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthStartIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Oauth Start Oauth Start Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - OAuth
  /oauth/callback:
    get:
      summary: Oauth Callback
      operationId: oauth_callback_oauth_callback_get
      parameters:
      - name: state
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: State
      - name: code
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Code
      - name: error
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Error
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - OAuth
  /oauth/status/{state}:
    get:
      summary: Oauth Status
      operationId: oauth_status_oauth_status__state__get
      parameters:
      - name: state
        in: path
        required: true
        schema:
          type: string
          title: State
      - name: x-treg-token
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Token
      - name: x-treg-org
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Org
      - name: treg_session
        in: cookie
        required: false
        schema:
          type: string
          default: ''
          title: Treg Session
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Oauth Status Oauth Status  State  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - OAuth
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    OAuthStartIn:
      properties:
        name:
          type: string
          title: Name
          default: ''
        provider:
          anyOf:
          - type: string
          - type: 'null'
          title: Provider
        capability:
          anyOf:
          - type: string
          - type: 'null'
          title: Capability
        connection_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Connection Id
        client_id:
          type: string
          title: Client Id
          default: ''
        client_secret:
          type: string
          title: Client Secret
          default: ''
        auth_uri:
          type: string
          title: Auth Uri
          default: https://accounts.google.com/o/oauth2/auth
        token_uri:
          type: string
          title: Token Uri
          default: https://oauth2.googleapis.com/token
        scopes:
          items:
            type: string
          type: array
          title: Scopes
          default: []
        redirect_uri:
          anyOf:
          - type: string
          - type: 'null'
          title: Redirect Uri
      type: object
      title: OAuthStartIn
      description: 'Two modes. BYO: supply client_id/client_secret/auth_uri/token_uri/scopes yourself.

        REGISTRY: supply `provider` (+ optional `capability`) and treg fills all of it from its own

        approved app — see oauth_providers.py.'