Skip to content

@line/bot-sdk


@line/bot-sdk / channelAccessToken / ChannelAccessTokenClient

Class: ChannelAccessTokenClient

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

Constructors

Constructor

new ChannelAccessTokenClient(config): ChannelAccessTokenClient

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

Parameters

config

httpClientConfig

Returns

ChannelAccessTokenClient

Methods

getsAllValidChannelAccessTokenKeyIds()

getsAllValidChannelAccessTokenKeyIds(clientAssertionType, clientAssertion): Promise<ChannelAccessTokenKeyIdsResponse>

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

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:78

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:108

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:163

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:186

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:131

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:221

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>

Deprecated

Use issueStatelessChannelTokenByJWTAssertion or issueStatelessChannelTokenByClientSecret instead.

See

Documentation


issueStatelessChannelTokenByClientSecret()

issueStatelessChannelTokenByClientSecret(clientId, clientSecret): Promise<IssueStatelessChannelAccessTokenResponse>

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

Issues a new stateless channel access token by client secret. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.

Parameters

clientId

string

Channel ID.

clientSecret

string

Channel secret.

Returns

Promise<IssueStatelessChannelAccessTokenResponse>

A promise containing the IssueStatelessChannelAccessTokenResponse.

See

Documentation


issueStatelessChannelTokenByClientSecretWithHttpInfo()

issueStatelessChannelTokenByClientSecretWithHttpInfo(clientId, clientSecret): Promise<ApiResponseType<IssueStatelessChannelAccessTokenResponse>>

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

Issues a new stateless channel access token by client secret. 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

clientId

string

Channel ID.

clientSecret

string

Channel secret.

Returns

Promise<ApiResponseType<IssueStatelessChannelAccessTokenResponse>>

A promise containing the IssueStatelessChannelAccessTokenResponse with HTTP info.

See

Documentation


issueStatelessChannelTokenByJWTAssertion()

issueStatelessChannelTokenByJWTAssertion(clientAssertion): Promise<IssueStatelessChannelAccessTokenResponse>

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

Issues a new stateless channel access token by JWT assertion. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.

Parameters

clientAssertion

string

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

Returns

Promise<IssueStatelessChannelAccessTokenResponse>

A promise containing the IssueStatelessChannelAccessTokenResponse.

See

Documentation


issueStatelessChannelTokenByJWTAssertionWithHttpInfo()

issueStatelessChannelTokenByJWTAssertionWithHttpInfo(clientAssertion): Promise<ApiResponseType<IssueStatelessChannelAccessTokenResponse>>

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

Issues a new stateless channel access token by JWT assertion. 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

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<IssueStatelessChannelAccessTokenResponse>>

A promise containing the IssueStatelessChannelAccessTokenResponse with HTTP info.

See

Documentation


issueStatelessChannelTokenWithHttpInfo()

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

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

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>>

Deprecated

Use issueStatelessChannelTokenByJWTAssertionWithHttpInfo or issueStatelessChannelTokenByClientSecretWithHttpInfo instead.

See

Documentation


revokeChannelToken()

revokeChannelToken(accessToken): Promise<MessageAPIResponseBase>

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

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:320

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:343

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:295

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:373

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:409

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:422

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:386

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