/kakao-link

Send kakaolink in Node.js.

Primary LanguageJavaScriptMIT LicenseMIT

kakao-link

NPM Version NPM Downloads

Installing

npm install kakao-link

Warning: This package is only supported on Node 16.5+. since 2.0.0. If you use under than Node 16.5+, you should use 1.2.0.

GitHub

Example

Initialization and send kakaolink

const KakaoLink = require('kakao-link');
const kakaoLink = new KakaoLink(JS_KEY, DOMAIN);

(async () => {
    await kakaoLink.login(BOT_ID, BOT_PW);
    await kakaoLink.send(
        ROOM_NAME,
        {
            link_ver: '4.0',
            template_id: TEMPLATE_ID,
            template_args: {
                TEMPLATE_ARGS
            }
        },
        'custom'
    );
})();