Layero OAuth API

The oauth API from Layero — 5 operation(s) for oauth.

GitHub OpenAPI

Operations 5

GET /.well-known/oauth-authorization-server Authorization Server Metadata #
POST /oauth/register Register Client #
GET /oauth/authorize/info Authorize Info #
POST /oauth/authorize/approve Approve #
POST /oauth/token Token #

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/layero-ru:layero-ru-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

layero-ru-oauth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Layero OAuth API
  version: 0.1.0
tags:
- name: OAuth
paths:
  /.well-known/oauth-authorization-server:
    get:
      tags:
      - OAuth
      summary: Authorization Server Metadata
      description: 'Метаданные сервера авторизации (RFC 8414).


        `issuer` — api.layero.ru, а страница согласия — на app.layero.ru: RFC 8414

        не требует, чтобы `authorization_endpoint` жил на том же хосте, а страница

        обязана быть панелью — там уже есть вход и сессия пользователя.'
      operationId: authorization_server_metadata__well_known_oauth_authorization_server_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /oauth/register:
    post:
      tags:
      - OAuth
      summary: Register Client
      description: Динамическая регистрация клиента (RFC 7591). Публичный клиент, без секрета.
      operationId: register_client_oauth_register_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterIn'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /oauth/authorize/info:
    get:
      tags:
      - OAuth
      summary: Authorize Info
      description: 'Что показать на странице согласия. Под сессией панели, чтобы имена

        клиентов не перебирались по client_id снаружи.'
      operationId: authorize_info_oauth_authorize_info_get
      parameters:
      - name: client_id
        in: query
        required: true
        schema:
          type: string
          minLength: 1
          maxLength: 200
          title: Client Id
      - name: redirect_uri
        in: query
        required: true
        schema:
          type: string
          minLength: 1
          maxLength: 2048
          title: Redirect Uri
      - name: scope
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            maxLength: 200
          - type: 'null'
          title: Scope
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizeInfoOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /oauth/authorize/approve:
    post:
      tags:
      - OAuth
      summary: Approve
      description: 'Пользователь нажал «Разрешить доступ»: выпустить код и вернуть адрес

        возврата. Редирект делает панель — бэкенд лишь собирает адрес, чтобы

        `redirect_uri` был сверен с зарегистрированным здесь, а не в браузере.


        Административный маршрут (`token_scopes.ADMIN_ROUTES`): по сути это выпуск

        токена, как `POST /auth/tokens`, — токен без `admin` не должен уметь

        выписать себе новый.'
      operationId: approve_oauth_authorize_approve_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApproveOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /oauth/token:
    post:
      tags:
      - OAuth
      summary: Token
      description: 'Обмен кода на токен (RFC 6749 §4.1.3 + PKCE RFC 7636).


        Ответ — обычный `layero_ci_*` без срока; см. докстроку модуля.'
      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'
components:
  schemas:
    RegisterIn:
      properties:
        client_name:
          type: string
          maxLength: 100
          minLength: 1
          title: Client Name
        redirect_uris:
          items:
            type: string
          type: array
          maxItems: 10
          minItems: 1
          title: Redirect Uris
        grant_types:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Grant Types
        response_types:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Response Types
        token_endpoint_auth_method:
          anyOf:
          - type: string
          - type: 'null'
          title: Token Endpoint Auth Method
        client_uri:
          anyOf:
          - type: string
            maxLength: 2048
          - type: 'null'
          title: Client Uri
        scope:
          anyOf:
          - type: string
            maxLength: 200
          - type: 'null'
          title: Scope
      type: object
      required:
      - client_name
      - redirect_uris
      title: RegisterIn
    ApproveIn:
      properties:
        client_id:
          type: string
          maxLength: 200
          minLength: 1
          title: Client Id
        redirect_uri:
          type: string
          maxLength: 2048
          minLength: 1
          title: Redirect Uri
        code_challenge:
          type: string
          maxLength: 128
          minLength: 43
          title: Code Challenge
        code_challenge_method:
          type: string
          const: S256
          title: Code Challenge Method
          default: S256
        state:
          anyOf:
          - type: string
            maxLength: 1024
          - type: 'null'
          title: State
        scope:
          anyOf:
          - type: string
            maxLength: 200
          - type: 'null'
          title: Scope
        resource:
          anyOf:
          - type: string
            maxLength: 2048
          - type: 'null'
          title: Resource
      type: object
      required:
      - client_id
      - redirect_uri
      - code_challenge
      title: ApproveIn
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApproveOut:
      properties:
        redirect_to:
          type: string
          title: Redirect To
      type: object
      required:
      - redirect_to
      title: ApproveOut
    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_token_oauth_token_post:
      properties:
        grant_type:
          type: string
          title: Grant Type
        code:
          anyOf:
          - type: string
          - type: 'null'
          title: Code
        redirect_uri:
          anyOf:
          - type: string
          - type: 'null'
          title: Redirect Uri
        client_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Id
        code_verifier:
          anyOf:
          - type: string
          - type: 'null'
          title: Code Verifier
        resource:
          anyOf:
          - type: string
          - type: 'null'
          title: Resource
      type: object
      required:
      - grant_type
      title: Body_token_oauth_token_post
    AuthorizeInfoOut:
      properties:
        client_id:
          type: string
          title: Client Id
        client_name:
          type: string
          title: Client Name
        redirect_uri:
          type: string
          title: Redirect Uri
        issuer:
          type: string
          title: Issuer
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        asks_admin:
          type: boolean
          title: Asks Admin
      type: object
      required:
      - client_id
      - client_name
      - redirect_uri
      - issuer
      - scopes
      - asks_admin
      title: AuthorizeInfoOut
    RegisterOut:
      properties:
        client_id:
          type: string
          title: Client Id
        client_name:
          type: string
          title: Client Name
        redirect_uris:
          items:
            type: string
          type: array
          title: Redirect Uris
        grant_types:
          items:
            type: string
          type: array
          title: Grant Types
        response_types:
          items:
            type: string
          type: array
          title: Response Types
        token_endpoint_auth_method:
          type: string
          const: none
          title: Token Endpoint Auth Method
        client_id_issued_at:
          type: integer
          title: Client Id Issued At
      type: object
      required:
      - client_id
      - client_name
      - redirect_uris
      - grant_types
      - response_types
      - token_endpoint_auth_method
      - client_id_issued_at
      title: RegisterOut