Appearance
@line/bot-sdk / Exports / channelAccessToken / ChannelAccessTokenClient
Class: ChannelAccessTokenClient
channelAccessToken.ChannelAccessTokenClient
Table of contents
Constructors
Methods
- getsAllValidChannelAccessTokenKeyIds
- getsAllValidChannelAccessTokenKeyIdsWithHttpInfo
- issueChannelToken
- issueChannelTokenByJWT
- issueChannelTokenByJWTWithHttpInfo
- issueChannelTokenWithHttpInfo
- issueStatelessChannelToken
- issueStatelessChannelTokenWithHttpInfo
- revokeChannelToken
- revokeChannelTokenByJWT
- revokeChannelTokenByJWTWithHttpInfo
- revokeChannelTokenWithHttpInfo
- verifyChannelToken
- verifyChannelTokenByJWT
- verifyChannelTokenByJWTWithHttpInfo
- verifyChannelTokenWithHttpInfo
Constructors
constructor
• new ChannelAccessTokenClient(config
): ChannelAccessTokenClient
Parameters
Name | Type |
---|---|
config | httpClientConfig |
Returns
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
Name | Type | Description |
---|---|---|
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
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
Name | Type | Description |
---|---|---|
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
Defined in
lib/channel-access-token/api/channelAccessTokenClient.ts:89
issueChannelToken
▸ issueChannelToken(grantType?
, clientId?
, clientSecret?
): Promise
<IssueShortLivedChannelAccessTokenResponse
>
Issue short-lived channel access token
Parameters
Name | Type | Description |
---|---|---|
grantType? | string | client_credentials |
clientId? | string | Channel ID. |
clientSecret? | string | Channel secret. |
Returns
Promise
<IssueShortLivedChannelAccessTokenResponse
>
See
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
Name | Type | Description |
---|---|---|
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
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
Name | Type | Description |
---|---|---|
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
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
Name | Type | Description |
---|---|---|
grantType? | string | client_credentials |
clientId? | string | Channel ID. |
clientSecret? | string | Channel secret. |
Returns
Promise
<ApiResponseType
<IssueShortLivedChannelAccessTokenResponse
>>
See
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
Name | Type | Description |
---|---|---|
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
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
Name | Type | Description |
---|---|---|
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
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
Name | Type | Description |
---|---|---|
accessToken? | string | Channel access token |
Returns
Promise
<MessageAPIResponseBase
>
See
Defined in
lib/channel-access-token/api/channelAccessTokenClient.ts:283
revokeChannelTokenByJWT
▸ revokeChannelTokenByJWT(clientId?
, clientSecret?
, accessToken?
): Promise
<MessageAPIResponseBase
>
Revoke channel access token v2.1
Parameters
Name | Type | Description |
---|---|---|
clientId? | string | Channel ID |
clientSecret? | string | Channel Secret |
accessToken? | string | Channel access token |
Returns
Promise
<MessageAPIResponseBase
>
See
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
Name | Type | Description |
---|---|---|
clientId? | string | Channel ID |
clientSecret? | string | Channel Secret |
accessToken? | string | Channel access token |
Returns
Promise
<ApiResponseType
<MessageAPIResponseBase
>>
See
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
Name | Type | Description |
---|---|---|
accessToken? | string | Channel access token |
Returns
Promise
<ApiResponseType
<MessageAPIResponseBase
>>
See
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
Name | Type | Description |
---|---|---|
accessToken? | string | A short-lived or long-lived channel access token. |
Returns
Promise
<VerifyChannelAccessTokenResponse
>
See
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
Name | Type | Description |
---|---|---|
accessToken | string | Channel access token with a user-specified expiration (Channel Access Token v2.1). |
Returns
Promise
<VerifyChannelAccessTokenResponse
>
See
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
Name | Type | Description |
---|---|---|
accessToken | string | Channel access token with a user-specified expiration (Channel Access Token v2.1). |
Returns
Promise
<ApiResponseType
<VerifyChannelAccessTokenResponse
>>
See
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
Name | Type | Description |
---|---|---|
accessToken? | string | A short-lived or long-lived channel access token. |
Returns
Promise
<ApiResponseType
<VerifyChannelAccessTokenResponse
>>
See
Defined in
lib/channel-access-token/api/channelAccessTokenClient.ts:383