LINE OpenAPI Specifications

repository·main·Indexed 41 days ago

https://github.com/line/line-openapi

Official OpenAPI specifications for LINE's Public APIs, including the Messaging API, LIFF, and Insight API. Provides machine-readable YAML definitions for endpoints such as api.line.me, api-data.line.me, and manager.line.biz to support client library generation and request validation.

Tokens
828
Snippets
3
Records
5
Agent score
3%

What's inside LINE

  1. Overview of LINE OpenAPI Specifications

    main

    This repository contains the OpenAPI specifications for LINE's Public APIs. It covers APIs listed on the official LINE Developers documentation site, specifically targeting the following endpoints:

    • api.line.me
    • api-data.line.me
    • manager.line.biz

    Developers can use these YAML files to generate client libraries, validate requests, or understand the data structures required for LINE integration.

  2. Run the OpenAPI documentation via Docker Compose

    main

    You can host the LINE OpenAPI documentation locally using Docker Compose. This setup uses swagger-ui to render the OpenAPI specifications.

    By default, the service maps port 8080 on your host to port 8080 in the container. The documentation is served by pointing the API_URL environment variable to the specific YAML specification file within the container's volume.

    services:
      swagger-ui:
        image: swaggerapi/swagger-ui:latest
        container_name: line-open-api-doc
        ports:
          - "8080:8080"
        environment:
          - PORT=8080
          - API_URL=/openapi/messaging-api.yml
        volumes:
          - ./:/usr/share/nginx/html/openapi
  3. Run Swagger UI via Docker command

    main

    If you do not want to use Docker Compose, you can run a single Docker command to launch Swagger UI. This command maps port 8080 and points the UI to a specific API specification file (e.g., messaging-api.yml) by mounting the current directory to the container.

    To view the Messaging API spec, use:

    docker run -p 8080:8080 -e PORT=8080 -e API_URL=/openapi/messaging-api.yml -v $(pwd):/usr/share/nginx/html/openapi swaggerapi/swagger-ui:latest
  4. Reference of supported LINE API specifications

    main

    The repository provides individual OpenAPI files for different LINE services. Use these files to target specific API endpoints:

    FileOpenAPI VersionAPI EndPointDescription
    channel-access-token.yml3.0.0https://api.line.me/Channel Access Token API
    insight.yml3.0.0https://api.line.me/v2/bot/insight/Insight API
    liff.yml3.0.2https://api.line.me/liff/LIFF API
    manage-audience.yml3.0.0https://api.line.me/v2/bot/audienceGroup/, https://api-data.line.me/v2/bot/audienceGroup/Audience Group API
    messaging-api.yml3.0.0https://api.line.me/v2/bot/, https://api-data.line.me/v2/bot/Messaging API
    module.yml3.0.0https://api.line.me/v2/bot/Messaging API
    module-attach.yml3.0.0https://manager.line.biz/module/auth/v1/tokenMessaging API
    shop.yml3.0.0https://api.line.me/shop/Mission Stickers API
    webhook.yml3.0.3N/AWebhook Event Objects