KOLens OAuth API

The OAuth API from KOLens — 9 operation(s) for oauth.

GitHub OpenAPI

Operations 10

GET /.well-known/oauth-protected-resource/mcp Protected Resource Metadata #
GET /.well-known/oauth-protected-resource Protected Resource Metadata #
GET /.well-known/oauth-authorization-server Authorization Server Metadata #
POST /oauth/register Register #
GET /oauth/authorize Authorize Get #
POST /oauth/authorize Authorize Post #
POST /oauth/token Token #
POST /oauth/revoke Revoke #
GET /oauth/connections List User Connections #
DELETE /oauth/connections/{client_id} Disconnect Client #

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/kolens-ai:kolens-ai-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

kolens-ai-oauth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: KOLens OAuth API
  description: KOLens — TikTok KOL Intelligence API. Search keywords, extract KOL profiles, collect contact info, export reports.
  version: 1.0.0
tags:
- name: OAuth
paths:
  /.well-known/oauth-protected-resource/mcp:
    get:
      tags:
      - OAuth
      summary: Protected Resource Metadata
      description: RFC 9728. Points the client at our authorization server.
      operationId: protected_resource_metadata__well_known_oauth_protected_resource_mcp_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /.well-known/oauth-protected-resource:
    get:
      tags:
      - OAuth
      summary: Protected Resource Metadata
      description: RFC 9728. Points the client at our authorization server.
      operationId: protected_resource_metadata__well_known_oauth_protected_resource_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /.well-known/oauth-authorization-server:
    get:
      tags:
      - OAuth
      summary: Authorization Server Metadata
      description: 'RFC 8414. Tells the client which endpoints exist + which flows

        are supported. Returned shape is what Claude.ai''s MCP connector

        expects to find via the well-known fetch.'
      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
      operationId: register_oauth_register_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterIn'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /oauth/authorize:
    get:
      tags:
      - OAuth
      summary: Authorize Get
      description: 'Render the consent page. Pre-validates the request so we don''t

        show a form to a request that''s going to fail anyway.'
      operationId: authorize_get_oauth_authorize_get
      parameters:
      - name: response_type
        in: query
        required: true
        schema:
          type: string
          title: Response Type
      - name: client_id
        in: query
        required: true
        schema:
          type: string
          title: Client Id
      - name: redirect_uri
        in: query
        required: true
        schema:
          type: string
          title: Redirect Uri
      - name: code_challenge
        in: query
        required: true
        schema:
          type: string
          title: Code Challenge
      - name: code_challenge_method
        in: query
        required: false
        schema:
          type: string
          default: S256
          title: Code Challenge Method
      - name: state
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: State
      - name: scope
        in: query
        required: false
        schema:
          type: string
          default: mcp
          title: Scope
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - OAuth
      summary: Authorize Post
      description: 'Process the consent form. On success, redirect back to the

        registered ``redirect_uri`` with ``?code=…&state=…``.'
      operationId: authorize_post_oauth_authorize_post
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_authorize_post_oauth_authorize_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /oauth/token:
    post:
      tags:
      - OAuth
      summary: Token
      description: 'RFC 6749 §3.2. Supports ``authorization_code`` + ``refresh_token``

        grants. Errors follow the OAuth-error JSON shape (``error`` +

        ``error_description``).'
      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: 'RFC 7009. Revoke an access or refresh token. Returns 200 even

        when the token is unknown (per spec — revoking a non-existent

        token should not signal anything to a probe). For refresh tokens

        we also revoke the paired access tokens so a leaked refresh can''t

        keep an attacker minting fresh access tokens after the user disconnects.'
      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/connections:
    get:
      tags:
      - OAuth
      summary: List User Connections
      description: 'List the authorized OAuth clients for the calling user. One

        entry per (client_id, scope) tuple with the count of live access

        tokens + the most recent ``last_used_at`` for that bundle.'
      operationId: list_user_connections_oauth_connections_get
      security:
      - HTTPBearer: []
      parameters:
      - name: x-kolens-user-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Kolens-User-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /oauth/connections/{client_id}:
    delete:
      tags:
      - OAuth
      summary: Disconnect Client
      description: 'Revoke every live token for (user, client). The Disconnect

        button on /account/connections hits this; the client''s next MCP

        call gets 401 immediately.'
      operationId: disconnect_client_oauth_connections__client_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: client_id
        in: path
        required: true
        schema:
          type: string
          title: Client Id
      - name: x-kolens-user-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Kolens-User-Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RegisterIn:
      properties:
        client_name:
          type: string
          maxLength: 120
          minLength: 1
          title: Client Name
        redirect_uris:
          items:
            type: string
          type: array
          minItems: 1
          title: Redirect Uris
        token_endpoint_auth_method:
          type: string
          title: Token Endpoint Auth Method
          default: none
        scope:
          type: string
          title: Scope
          default: read:kols write:lists run:scrape
      type: object
      required:
      - client_name
      - redirect_uris
      title: RegisterIn
    Body_token_oauth_token_post:
      properties:
        grant_type:
          type: string
          title: Grant Type
        code:
          anyOf:
          - type: string
          - type: 'null'
          title: Code
        code_verifier:
          anyOf:
          - type: string
          - type: 'null'
          title: Code Verifier
        redirect_uri:
          anyOf:
          - type: string
          - type: 'null'
          title: Redirect Uri
        refresh_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Refresh Token
        client_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Id
        client_secret:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Secret
      type: object
      required:
      - grant_type
      title: Body_token_oauth_token_post
    Body_authorize_post_oauth_authorize_post:
      properties:
        client_id:
          type: string
          title: Client Id
        redirect_uri:
          type: string
          title: Redirect Uri
        code_challenge:
          type: string
          title: Code Challenge
        code_challenge_method:
          type: string
          title: Code Challenge Method
          default: S256
        state:
          type: string
          title: State
          default: ''
        scope:
          type: string
          title: Scope
          default: mcp
        api_key:
          type: string
          title: Api Key
      type: object
      required:
      - client_id
      - redirect_uri
      - code_challenge
      - api_key
      title: Body_authorize_post_oauth_authorize_post
    Body_revoke_oauth_revoke_post:
      properties:
        token:
          type: string
          title: Token
        token_type_hint:
          anyOf:
          - type: string
          - type: 'null'
          title: Token Type Hint
        client_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Id
        client_secret:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Secret
      type: object
      required:
      - token
      title: Body_revoke_oauth_revoke_post
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer