LINE.Bot.LineModuleAttach (line_bot_sdk v0.2.0)

Copy Markdown

API calls for all endpoints tagged LineModuleAttach.

Summary

Functions

Create a new LineModuleAttach client.

Functions

attach_module(client, grant_type, code, redirect_uri, optional_args \\ [], client_opts \\ [])

Attach by operation of the module channel provider

Parameters

  • client (Req.Request.t/0): Client to make request with
  • grant_type (String.t/0): authorization_code
  • code (String.t/0): Authorization code received from the LINE Platform.
  • redirect_uri (String.t/0): Specify the redirect_uri specified in the URL for authentication and authorization.
  • optional_args (keyword): Optional parameters
    • :code_verifier (String.t/0): 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 (String.t/0): 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 (String.t/0): 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 (String.t/0): If you specified a value for region in the URL for authentication and authorization, specify the same value.
    • :basic_search_id (String.t/0): If you specified a value for basic_search_id in the URL for authentication and authorization, specify the same value.
    • :scope (String.t/0): If you specified a value for scope in the URL for authentication and authorization, specify the same value.
    • :brand_type (String.t/0): If you specified a value for brand_type in the URL for authentication and authorization, specify the same value.
  • client_opts (keyword/0): Options to pass to Req.request

Returns

  • {:ok, LINE.Bot.Model.AttachModuleResponse.t} on success
  • {:error, Req.Response.t} on failure

new(options \\ [])

Create a new LineModuleAttach client.

Options

  • :base_url - base URL for requests (default: "https://manager.line.biz")
  • :channel_token (required) - channel access token for Bearer authorization
  • :plug - plug to use for testing (see Req.new/1)