messaging-apis
messaging-apis copied to clipboard
[LINE] support issue token and revoke token
https://developers.line.me/en/reference/messaging-api/#issue-channel-access-token
And then we may want to add short-lived access token and re-issue token support for LineClient.
Content-Type | application/x-www-form-urlencoded
const token = await LineClient.issueAccessToken({
grant_type: 'client_credentials',
client_id: '...',
client_secret: '...',
});
console.log(token);
// {
// access_token: '...',
// expires_in: '..',
// token_type: 'Bearer'
// }
await LineClient.revokeAccessToken('...');
https://github.com/line/line-bot-sdk-nodejs/blob/ef007816fc96e53a80b5ff8a6c4ea7f14c9dc78e/lib/client.ts#L727-L781