LINE Module Attach API

A single operation that attaches a module channel to a LINE Official Account and returns the resulting bot and scope grant. The only operation across LINE's nine published specifications that uses HTTP Basic authentication, and the only one served from manager.line.biz rather than api.line.me.

OpenAPI Specification

line-module-attach-openapi.yml Raw ↑
---
openapi: 3.0.0
info:
  title: LINE Messaging API
  version: "0.0.1"
  description:
    This document describes LINE Messaging API.

servers:
  - url: "https://manager.line.biz"

security:
  - basicAuth: []

tags:
  - name: line-module-attach

paths:
  "/module/auth/v1/token":
    post:
      externalDocs:
        url: https://developers.line.biz/en/reference/partner-docs/#link-attach-by-operation-module-channel-provider
      tags:
        - line-module-attach
      operationId: attachModule
      description: "Attach by operation of the module channel provider"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              description: "request of the attachModule"
              type: object
              properties:
                grant_type:
                  type: string
                  description: "authorization_code"
                  example: authorization_code
                code:
                  type: string
                  description: "Authorization code received from the LINE Platform."
                redirect_uri:
                  type: string
                  description: "Specify the redirect_uri specified in the URL for authentication and authorization."
                code_verifier:
                  type: string
                  description: "Specify when using PKCE (Proof Key for Code Exchange) defined in the OAuth 2.0 extension specification as a countermeasure against authorization code interception attacks."
                client_id:
                  type: string
                  description: |+
                    Instead of using Authorization header, you can use this parameter to specify the channel ID of the module channel.
                    You can find the channel ID of the module channel in the LINE Developers Console.
                client_secret:
                  type: string
                  description: |+
                    Instead of using Authorization header, you can use this parameter to specify the channel secret of the module channel.
                    You can find the channel secret of the module channel in the LINE Developers Console.
                region:
                  type: string
                  description: |+
                    If you specified a value for region in the URL for authentication and authorization, specify the same value.
                basic_search_id:
                  type: string
                  description: "If you specified a value for basic_search_id in the URL for authentication and authorization, specify the same value."
                scope:
                  type: string
                  description: "If you specified a value for scope in the URL for authentication and authorization, specify the same value."
                brand_type:
                  type: string
                  description: "If you specified a value for brand_type in the URL for authentication and authorization, specify the same value."
              required:
                - grant_type
                - code
                - redirect_uri
      responses:
        "200":
          content:
            "application/json":
              schema:
                $ref: "#/components/schemas/AttachModuleResponse"
              example:
                bot_id: U45c5c51f0050ef0f0ee7261d57fd3c56
                scopes:
                  - message:send
                  - message:receive
          description: "OK"


components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

  schemas:
    AttachModuleResponse:
      externalDocs:
        url: https://developers.line.biz/en/reference/partner-docs/#link-attach-by-operation-module-channel-provider
      description: "Attach by operation of the module channel provider"
      required:
        - bot_id
        - scopes
      properties:
        bot_id:
          type: string
          description: "User ID of the bot on the LINE Official Account."
        scopes:
          type: array
          description: "Permissions (scope) granted by the LINE Official Account admin."
          items:
            type: string