Appearance
@line/bot-sdk / moduleAttach / LineModuleAttachClient
Class: LineModuleAttachClient
Defined in: lib/module-attach/api/lineModuleAttachClient.ts:50
See
LineBotClient for a unified interface that wraps this client.
Constructors
Constructor
new LineModuleAttachClient(
config):LineModuleAttachClient
Defined in: lib/module-attach/api/lineModuleAttachClient.ts:66
Initializes a new LineModuleAttachClient.
Parameters
config
httpClientConfig
Configuration for this API client.
Returns
LineModuleAttachClient
Example
ts
const client = new LineModuleAttachClient({
channelAccessToken: process.env.LINE_CHANNEL_ACCESS_TOKEN!,
});Methods
attachModule()
attachModule(
grantType,code,redirectUri,codeVerifier?,clientId?,clientSecret?,region?,basicSearchId?,scope?,brandType?):Promise<AttachModuleResponse>
Defined in: lib/module-attach/api/lineModuleAttachClient.ts:94
Attach by operation of the module channel provider Calls POST https://manager.line.biz/module/auth/v1/token. To inspect the HTTP status code or response headers, use attachModuleWithHttpInfo.
Parameters
grantType
string
authorization_code
code
string
Authorization code received from the LINE Platform.
redirectUri
string
Specify the redirect_uri specified in the URL for authentication and authorization.
codeVerifier?
string
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.
clientId?
string
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.
clientSecret?
string
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
If you specified a value for region in the URL for authentication and authorization, specify the same value.
basicSearchId?
string
If you specified a value for basic_search_id in the URL for authentication and authorization, specify the same value.
scope?
string
If you specified a value for scope in the URL for authentication and authorization, specify the same value.
brandType?
string
If you specified a value for brand_type in the URL for authentication and authorization, specify the same value.
Returns
Promise<AttachModuleResponse>
A promise resolving to the response body.
See
attachModuleWithHttpInfo()
attachModuleWithHttpInfo(
grantType,code,redirectUri,codeVerifier?,clientId?,clientSecret?,region?,basicSearchId?,scope?,brandType?):Promise<ApiResponseType<AttachModuleResponse>>
Defined in: lib/module-attach/api/lineModuleAttachClient.ts:139
Attach by operation of the module channel provider Calls POST https://manager.line.biz/module/auth/v1/token. This method returns the response body together with the underlying httpResponse.
Parameters
grantType
string
authorization_code
code
string
Authorization code received from the LINE Platform.
redirectUri
string
Specify the redirect_uri specified in the URL for authentication and authorization.
codeVerifier?
string
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.
clientId?
string
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.
clientSecret?
string
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
If you specified a value for region in the URL for authentication and authorization, specify the same value.
basicSearchId?
string
If you specified a value for basic_search_id in the URL for authentication and authorization, specify the same value.
scope?
string
If you specified a value for scope in the URL for authentication and authorization, specify the same value.
brandType?
string
If you specified a value for brand_type in the URL for authentication and authorization, specify the same value.
Returns
Promise<ApiResponseType<AttachModuleResponse>>
A promise resolving to the response body together with the underlying httpResponse.