Skip to content

@line/bot-sdk / Exports / channelAccessToken / ChannelAccessTokenClient

Class: ChannelAccessTokenClient

channelAccessToken.ChannelAccessTokenClient

Table of contents

Constructors

Methods

Constructors

constructor

new ChannelAccessTokenClient(config): ChannelAccessTokenClient

Parameters

NameType
confighttpClientConfig

Returns

ChannelAccessTokenClient

Defined in

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

Methods

getsAllValidChannelAccessTokenKeyIds

getsAllValidChannelAccessTokenKeyIds(clientAssertionType, clientAssertion): Promise<ChannelAccessTokenKeyIdsResponse>

Gets all valid channel access token key IDs.

Parameters

NameTypeDescription
clientAssertionTypestringurn:ietf:params:oauth:client-assertion-type:jwt-bearer
clientAssertionstringA JSON Web Token (JWT) (opens new window)the client needs to create and sign with the private key.

Returns

Promise<ChannelAccessTokenKeyIdsResponse>

See

Documentation

Defined in

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


getsAllValidChannelAccessTokenKeyIdsWithHttpInfo

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

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

Parameters

NameTypeDescription
clientAssertionTypestringurn:ietf:params:oauth:client-assertion-type:jwt-bearer
clientAssertionstringA JSON Web Token (JWT) (opens new window)the client needs to create and sign with the private key.

Returns

Promise<ApiResponseType<ChannelAccessTokenKeyIdsResponse>>

See

Documentation

Defined in

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


issueChannelToken

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

Issue short-lived channel access token

Parameters

NameTypeDescription
grantType?stringclient_credentials
clientId?stringChannel ID.
clientSecret?stringChannel secret.

Returns

Promise<IssueShortLivedChannelAccessTokenResponse>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:117


issueChannelTokenByJWT

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

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

Parameters

NameTypeDescription
grantType?stringclient_credentials
clientAssertionType?stringurn:ietf:params:oauth:client-assertion-type:jwt-bearer
clientAssertion?stringA JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.

Returns

Promise<IssueChannelAccessTokenResponse>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:170


issueChannelTokenByJWTWithHttpInfo

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

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

NameTypeDescription
grantType?stringclient_credentials
clientAssertionType?stringurn:ietf:params:oauth:client-assertion-type:jwt-bearer
clientAssertion?stringA 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

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:193


issueChannelTokenWithHttpInfo

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

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

Parameters

NameTypeDescription
grantType?stringclient_credentials
clientId?stringChannel ID.
clientSecret?stringChannel secret.

Returns

Promise<ApiResponseType<IssueShortLivedChannelAccessTokenResponse>>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:140


issueStatelessChannelToken

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

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

NameTypeDescription
grantType?stringclient_credentials
clientAssertionType?stringURL-encoded value of urn:ietf:params:oauth:client-assertion-type:jwt-bearer
clientAssertion?stringA JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.
clientId?stringChannel ID.
clientSecret?stringChannel secret.

Returns

Promise<IssueStatelessChannelAccessTokenResponse>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:225


issueStatelessChannelTokenWithHttpInfo

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

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

NameTypeDescription
grantType?stringclient_credentials
clientAssertionType?stringURL-encoded value of urn:ietf:params:oauth:client-assertion-type:jwt-bearer
clientAssertion?stringA JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.
clientId?stringChannel ID.
clientSecret?stringChannel secret.

Returns

Promise<ApiResponseType<IssueStatelessChannelAccessTokenResponse>>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:254


revokeChannelToken

revokeChannelToken(accessToken?): Promise<MessageAPIResponseBase>

Revoke short-lived or long-lived channel access token

Parameters

NameTypeDescription
accessToken?stringChannel access token

Returns

Promise<MessageAPIResponseBase>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:283


revokeChannelTokenByJWT

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

Revoke channel access token v2.1

Parameters

NameTypeDescription
clientId?stringChannel ID
clientSecret?stringChannel Secret
accessToken?stringChannel access token

Returns

Promise<MessageAPIResponseBase>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:319


revokeChannelTokenByJWTWithHttpInfo

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

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

Parameters

NameTypeDescription
clientId?stringChannel ID
clientSecret?stringChannel Secret
accessToken?stringChannel access token

Returns

Promise<ApiResponseType<MessageAPIResponseBase>>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:342


revokeChannelTokenWithHttpInfo

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

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

Parameters

NameTypeDescription
accessToken?stringChannel access token

Returns

Promise<ApiResponseType<MessageAPIResponseBase>>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:296


verifyChannelToken

verifyChannelToken(accessToken?): Promise<VerifyChannelAccessTokenResponse>

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

Parameters

NameTypeDescription
accessToken?stringA short-lived or long-lived channel access token.

Returns

Promise<VerifyChannelAccessTokenResponse>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:370


verifyChannelTokenByJWT

verifyChannelTokenByJWT(accessToken): Promise<VerifyChannelAccessTokenResponse>

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

Parameters

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

Returns

Promise<VerifyChannelAccessTokenResponse>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:404


verifyChannelTokenByJWTWithHttpInfo

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

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

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

Returns

Promise<ApiResponseType<VerifyChannelAccessTokenResponse>>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:417


verifyChannelTokenWithHttpInfo

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

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

Parameters

NameTypeDescription
accessToken?stringA short-lived or long-lived channel access token.

Returns

Promise<ApiResponseType<VerifyChannelAccessTokenResponse>>

See

Documentation

Defined in

lib/channel-access-token/api/channelAccessTokenClient.ts:383