Skip to content

@line/bot-sdk


@line/bot-sdk / channelAccessToken / ChannelAccessTokenClient

Class: ChannelAccessTokenClient

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:38

Constructors

new ChannelAccessTokenClient()

new ChannelAccessTokenClient(config): ChannelAccessTokenClient

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:41

Parameters

config

httpClientConfig

Returns

ChannelAccessTokenClient

Methods

getsAllValidChannelAccessTokenKeyIds()

getsAllValidChannelAccessTokenKeyIds(clientAssertionType, clientAssertion): Promise<ChannelAccessTokenKeyIdsResponse>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:69

Gets all valid channel access token key IDs.

Parameters

clientAssertionType

string

urn:ietf:params:oauth:client-assertion-type:jwt-bearer

clientAssertion

string

A JSON Web Token (JWT) (opens new window)the client needs to create and sign with the private key.

Returns

Promise<ChannelAccessTokenKeyIdsResponse>

See

Documentation


getsAllValidChannelAccessTokenKeyIdsWithHttpInfo()

getsAllValidChannelAccessTokenKeyIdsWithHttpInfo(clientAssertionType, clientAssertion): Promise<ApiResponseType<ChannelAccessTokenKeyIdsResponse>>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:89

Gets all valid channel access token key IDs.. This method includes HttpInfo object to return additional information.

Parameters

clientAssertionType

string

urn:ietf:params:oauth:client-assertion-type:jwt-bearer

clientAssertion

string

A JSON Web Token (JWT) (opens new window)the client needs to create and sign with the private key.

Returns

Promise<ApiResponseType<ChannelAccessTokenKeyIdsResponse>>

See

Documentation


issueChannelToken()

issueChannelToken(grantType, clientId, clientSecret): Promise<IssueShortLivedChannelAccessTokenResponse>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:119

Issue short-lived channel access token

Parameters

grantType

string

client_credentials

clientId

string

Channel ID.

clientSecret

string

Channel secret.

Returns

Promise<IssueShortLivedChannelAccessTokenResponse>

See

Documentation


issueChannelTokenByJWT()

issueChannelTokenByJWT(grantType, clientAssertionType, clientAssertion): Promise<IssueChannelAccessTokenResponse>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:174

Issues a channel access token that allows you to specify a desired expiration date. This method lets you use JWT assertion for authentication.

Parameters

grantType

string

client_credentials

clientAssertionType

string

urn:ietf:params:oauth:client-assertion-type:jwt-bearer

clientAssertion

string

A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.

Returns

Promise<IssueChannelAccessTokenResponse>

See

Documentation


issueChannelTokenByJWTWithHttpInfo()

issueChannelTokenByJWTWithHttpInfo(grantType, clientAssertionType, clientAssertion): Promise<ApiResponseType<IssueChannelAccessTokenResponse>>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:197

Issues a channel access token that allows you to specify a desired expiration date. This method lets you use JWT assertion for authentication.. This method includes HttpInfo object to return additional information.

Parameters

grantType

string

client_credentials

clientAssertionType

string

urn:ietf:params:oauth:client-assertion-type:jwt-bearer

clientAssertion

string

A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.

Returns

Promise<ApiResponseType<IssueChannelAccessTokenResponse>>

See

Documentation


issueChannelTokenWithHttpInfo()

issueChannelTokenWithHttpInfo(grantType, clientId, clientSecret): Promise<ApiResponseType<IssueShortLivedChannelAccessTokenResponse>>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:142

Issue short-lived channel access token. This method includes HttpInfo object to return additional information.

Parameters

grantType

string

client_credentials

clientId

string

Channel ID.

clientSecret

string

Channel secret.

Returns

Promise<ApiResponseType<IssueShortLivedChannelAccessTokenResponse>>

See

Documentation


issueStatelessChannelToken()

issueStatelessChannelToken(grantType?, clientAssertionType?, clientAssertion?, clientId?, clientSecret?): Promise<IssueStatelessChannelAccessTokenResponse>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:231

Issues a new stateless channel access token, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.

Parameters

grantType?

string

client_credentials

clientAssertionType?

string

URL-encoded value of urn:ietf:params:oauth:client-assertion-type:jwt-bearer

clientAssertion?

string

A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.

clientId?

string

Channel ID.

clientSecret?

string

Channel secret.

Returns

Promise<IssueStatelessChannelAccessTokenResponse>

See

Documentation


issueStatelessChannelTokenWithHttpInfo()

issueStatelessChannelTokenWithHttpInfo(grantType?, clientAssertionType?, clientAssertion?, clientId?, clientSecret?): Promise<ApiResponseType<IssueStatelessChannelAccessTokenResponse>>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:260

Issues a new stateless channel access token, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. . This method includes HttpInfo object to return additional information.

Parameters

grantType?

string

client_credentials

clientAssertionType?

string

URL-encoded value of urn:ietf:params:oauth:client-assertion-type:jwt-bearer

clientAssertion?

string

A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.

clientId?

string

Channel ID.

clientSecret?

string

Channel secret.

Returns

Promise<ApiResponseType<IssueStatelessChannelAccessTokenResponse>>

See

Documentation


revokeChannelToken()

revokeChannelToken(accessToken): Promise<MessageAPIResponseBase>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:291

Revoke short-lived or long-lived channel access token

Parameters

accessToken

string

Channel access token

Returns

Promise<MessageAPIResponseBase>

See

Documentation


revokeChannelTokenByJWT()

revokeChannelTokenByJWT(clientId, clientSecret, accessToken): Promise<MessageAPIResponseBase>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:329

Revoke channel access token v2.1

Parameters

clientId

string

Channel ID

clientSecret

string

Channel Secret

accessToken

string

Channel access token

Returns

Promise<MessageAPIResponseBase>

See

Documentation


revokeChannelTokenByJWTWithHttpInfo()

revokeChannelTokenByJWTWithHttpInfo(clientId, clientSecret, accessToken): Promise<ApiResponseType<MessageAPIResponseBase>>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:352

Revoke channel access token v2.1. This method includes HttpInfo object to return additional information.

Parameters

clientId

string

Channel ID

clientSecret

string

Channel Secret

accessToken

string

Channel access token

Returns

Promise<ApiResponseType<MessageAPIResponseBase>>

See

Documentation


revokeChannelTokenWithHttpInfo()

revokeChannelTokenWithHttpInfo(accessToken): Promise<ApiResponseType<MessageAPIResponseBase>>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:304

Revoke short-lived or long-lived channel access token. This method includes HttpInfo object to return additional information.

Parameters

accessToken

string

Channel access token

Returns

Promise<ApiResponseType<MessageAPIResponseBase>>

See

Documentation


verifyChannelToken()

verifyChannelToken(accessToken): Promise<VerifyChannelAccessTokenResponse>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:382

Verify the validity of short-lived and long-lived channel access tokens

Parameters

accessToken

string

A short-lived or long-lived channel access token.

Returns

Promise<VerifyChannelAccessTokenResponse>

See

Documentation


verifyChannelTokenByJWT()

verifyChannelTokenByJWT(accessToken): Promise<VerifyChannelAccessTokenResponse>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:418

You can verify whether a Channel access token with a user-specified expiration (Channel Access Token v2.1) is valid.

Parameters

accessToken

string

Channel access token with a user-specified expiration (Channel Access Token v2.1).

Returns

Promise<VerifyChannelAccessTokenResponse>

See

Documentation


verifyChannelTokenByJWTWithHttpInfo()

verifyChannelTokenByJWTWithHttpInfo(accessToken): Promise<ApiResponseType<VerifyChannelAccessTokenResponse>>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:431

You can verify whether a Channel access token with a user-specified expiration (Channel Access Token v2.1) is valid.. This method includes HttpInfo object to return additional information.

Parameters

accessToken

string

Channel access token with a user-specified expiration (Channel Access Token v2.1).

Returns

Promise<ApiResponseType<VerifyChannelAccessTokenResponse>>

See

Documentation


verifyChannelTokenWithHttpInfo()

verifyChannelTokenWithHttpInfo(accessToken): Promise<ApiResponseType<VerifyChannelAccessTokenResponse>>

Defined in: lib/channel-access-token/api/channelAccessTokenClient.ts:395

Verify the validity of short-lived and long-lived channel access tokens. This method includes HttpInfo object to return additional information.

Parameters

accessToken

string

A short-lived or long-lived channel access token.

Returns

Promise<ApiResponseType<VerifyChannelAccessTokenResponse>>

See

Documentation