> ## Documentation Index
> Fetch the complete documentation index at: https://docs.story.foundation/llms.txt
> Use this file to discover all available pages before exploring further.

# Get License Tokens

> Retrieve license tokens with optional filtering. If no filters are provided, returns all license tokens. Supports filtering by owner wallet address and/or licensor IP ID. Results are paginated and can be ordered by 'blockNumber' (default: descending).



## OpenAPI

````yaml https://api.storyapis.com/api/v4/openapi.json post /licenses/tokens
openapi: 3.1.0
info:
  description: Story Protocol API V4
  title: Story Protocol API V4
  version: v4
servers:
  - url: https://api.storyapis.com/api/v4
  - url: https://staging-api.storyprotocol.net/api/v4
  - description: Local development server
    url: http://localhost:8080/api/v4
security: []
paths:
  /licenses/tokens:
    post:
      tags:
        - Protocol V4
        - License Tokens
      summary: Get License Tokens
      description: >-
        Retrieve license tokens with optional filtering. If no filters are
        provided, returns all license tokens. Supports filtering by owner wallet
        address and/or licensor IP ID. Results are paginated and can be ordered
        by 'blockNumber' (default: descending).
      operationId: getLicenseTokensV4
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LicenseTokensRequestBodyHuma'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseTokensResponseHumaBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    LicenseTokensRequestBodyHuma:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.storyapis.com/api/v4/LicenseTokensRequestBodyHuma.json
          format: uri
          readOnly: true
          type: string
        orderBy:
          default: blockNumber
          description: Field to order results by (only 'blockNumber' is supported)
          enum:
            - blockNumber
          type: string
        orderDirection:
          default: desc
          description: >-
            Order direction for results ('asc' for ascending, 'desc' for
            descending)
          enum:
            - asc
            - desc
          type: string
        pagination:
          $ref: '#/components/schemas/LicenseTokenPaginationOptionsHuma'
          description: 'Pagination configuration (optional, defaults: limit=100, offset=0)'
        where:
          $ref: '#/components/schemas/LicenseTokensWhereOptionsHuma'
          description: Optional filter options for license tokens
      type: object
    LicenseTokensResponseHumaBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - >-
              https://api.storyapis.com/api/v4/LicenseTokensResponseHumaBody.json
          format: uri
          readOnly: true
          type: string
        data:
          description: List of license tokens matching the filter criteria
          items:
            $ref: '#/components/schemas/LicenseToken'
          type:
            - array
            - 'null'
        pagination:
          $ref: '#/components/schemas/PaginationMetadataHuma'
          description: Pagination metadata including total count and hasMore flag
      required:
        - data
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.storyapis.com/api/v4/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    LicenseTokenPaginationOptionsHuma:
      additionalProperties: false
      properties:
        limit:
          default: 100
          description: Number of items to return
          examples:
            - 100
          format: int64
          maximum: 200
          minimum: 1
          type: integer
        offset:
          default: 0
          description: Number of items to skip
          examples:
            - 0
          format: int64
          minimum: 0
          type: integer
      type: object
    LicenseTokensWhereOptionsHuma:
      additionalProperties: false
      properties:
        licensorIpId:
          description: Optional licensor IP ID to filter license tokens
          examples:
            - '0x0987654321098765432109876543210987654321'
          pattern: ^0x[a-fA-F0-9]{40}$
          type: string
        ownerAddress:
          description: Optional owner wallet address to filter license tokens
          examples:
            - '0x1234567890123456789012345678901234567890'
          pattern: ^0x[a-fA-F0-9]{40}$
          type: string
      type: object
    LicenseToken:
      additionalProperties: false
      properties:
        blockNumber:
          type: string
        blockTime:
          type: string
        burntAt:
          type: string
        id:
          type: string
        licenseTemplate:
          type: string
        licenseTermsId:
          type: string
        licensorIpId:
          type: string
        owner:
          type: string
        transferable:
          type: string
      required:
        - id
        - licensorIpId
        - licenseTemplate
        - licenseTermsId
        - transferable
        - owner
        - burntAt
        - blockNumber
        - blockTime
      type: object
    PaginationMetadataHuma:
      additionalProperties: false
      properties:
        hasMore:
          description: Whether there are more items
          type: boolean
        limit:
          description: Current limit
          format: int64
          type: integer
        offset:
          description: Current offset
          format: int64
          type: integer
        total:
          description: Total count of items
          format: int64
          type: integer
      required:
        - offset
        - limit
        - total
        - hasMore
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-Api-Key
      type: apiKey

````