{"id":13406683,"url":"https://github.com/bottenderjs/messaging-apis","last_synced_at":"2025-05-15T14:02:11.119Z","repository":{"id":38408378,"uuid":"90862638","full_name":"bottenderjs/messaging-apis","owner":"bottenderjs","description":"Messaging APIs for multi-platform","archived":false,"fork":false,"pushed_at":"2023-02-03T04:53:24.000Z","size":11450,"stargazers_count":1919,"open_issues_count":14,"forks_count":206,"subscribers_count":62,"default_branch":"master","last_synced_at":"2025-05-07T06:02:51.368Z","etag":null,"topics":["api-client","bot","chatbot","line","messaging","messenger","slack","telegram","viber","wechat"],"latest_commit_sha":null,"homepage":"https://bottenderjs.github.io/messaging-apis/latest/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bottenderjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-10T12:38:40.000Z","updated_at":"2025-05-04T09:36:02.000Z","dependencies_parsed_at":"2023-02-06T13:16:17.630Z","dependency_job_id":null,"html_url":"https://github.com/bottenderjs/messaging-apis","commit_stats":null,"previous_names":["yoctol/messaging-apis"],"tags_count":168,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bottenderjs%2Fmessaging-apis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bottenderjs%2Fmessaging-apis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bottenderjs%2Fmessaging-apis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bottenderjs%2Fmessaging-apis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bottenderjs","download_url":"https://codeload.github.com/bottenderjs/messaging-apis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254039340,"owners_count":22004255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","bot","chatbot","line","messaging","messenger","slack","telegram","viber","wechat"],"created_at":"2024-07-30T19:02:36.431Z","updated_at":"2025-05-15T14:02:11.060Z","avatar_url":"https://github.com/bottenderjs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Messaging APIs\n\n[![Build Status](https://github.com/Yoctol/messaging-apis/workflows/Node.js%20CI/badge.svg)](https://github.com/Yoctol/messaging-apis/actions?query=workflow%3ANode.js%20CI+branch%3Amaster)\n[![coverage](https://codecov.io/gh/Yoctol/messaging-apis/branch/master/graph/badge.svg)](https://codecov.io/gh/Yoctol/messaging-apis)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nMessaging APIs is a [mono repo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md) which collects APIs needed for bot development.\n\nIt helps you build your bots using similar API for multiple platforms, e.g. Messenger, LINE. Learn once and make writing cross-platform bots easier.\n\nIf you are looking for a framework to build your bots, [Bottender](https://github.com/Yoctol/bottender) may suit for your needs. It is built on top of [Messaging APIs](https://github.com/Yoctol/messaging-apis) and provides some powerful features for bot building.\n\n![](https://user-images.githubusercontent.com/3382565/33652388-3644799e-daa4-11e7-97f1-e9af5788ff6e.png)\n\n## Packages\n\n| Package                                                        | Version                                                                                                                                     | Platform                                |\n| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |\n| [`messaging-api-messenger`](/packages/messaging-api-messenger) | [![npm](https://img.shields.io/npm/v/messaging-api-messenger.svg?style=flat-square)](https://www.npmjs.com/package/messaging-api-messenger) | [Messenger](https://www.messenger.com/) |\n| [`messaging-api-line`](/packages/messaging-api-line)           | [![npm](https://img.shields.io/npm/v/messaging-api-line.svg?style=flat-square)](https://www.npmjs.com/package/messaging-api-line)           | [LINE](https://line.me/)                |\n| [`messaging-api-slack`](/packages/messaging-api-slack)         | [![npm](https://img.shields.io/npm/v/messaging-api-slack.svg?style=flat-square)](https://www.npmjs.com/package/messaging-api-slack)         | [Slack](https://slack.com/)             |\n| [`messaging-api-telegram`](/packages/messaging-api-telegram)   | [![npm](https://img.shields.io/npm/v/messaging-api-telegram.svg?style=flat-square)](https://www.npmjs.com/package/messaging-api-telegram)   | [Telegram](https://telegram.org/)       |\n| [`messaging-api-viber`](/packages/messaging-api-viber)         | [![npm](https://img.shields.io/npm/v/messaging-api-viber.svg?style=flat-square)](https://www.npmjs.com/package/messaging-api-viber)         | [Viber](https://www.viber.com/)         |\n| [`messaging-api-wechat`](/packages/messaging-api-wechat)       | [![npm](https://img.shields.io/npm/v/messaging-api-wechat.svg?style=flat-square)](https://www.npmjs.com/package/messaging-api-wechat)       | [WeChat](https://weixin.qq.com/)        |\n\n## Usage\n\n## Messenger\n\n\u003cimg src=\"https://static.xx.fbcdn.net/rsrc.php/yg/r/4_vfHVmZ5XD.ico\" alt=\"Messenger\" width=\"100\" /\u003e\n\nInstall `messaging-api-messenger` package from the registry:\n\n```sh\nnpm i --save messaging-api-messenger\n```\n\nor\n\n```sh\nyarn add messaging-api-messenger\n```\n\nThen, create a `MessengerClient` to call Messenger APIs:\n\n```js\nconst { MessengerClient } = require('messaging-api-messenger');\n\n// get accessToken from facebook developers website\nconst client = new MessengerClient({\n  accessToken: 'ACCESS_TOKEN',\n});\n\nclient.sendText(userId, 'Hello World').then(() =\u003e {\n  console.log('sent');\n});\n```\n\nCheck out [full API documentation](./packages/messaging-api-messenger/README.md) for more detail information.\n\n## LINE\n\n\u003cimg src=\"http://is5.mzstatic.com/image/thumb/Purple117/v4/01/c2/4d/01c24d99-4aae-71ea-24e2-d0b68f8c53d2/source/1200x630bb.jpg\" alt=\"LINE\" width=\"100\" /\u003e\n\nInstall `messaging-api-line` package from the registry:\n\n```sh\nnpm i --save messaging-api-line\n```\n\nor\n\n```sh\nyarn add messaging-api-line\n```\n\nThen, create a `LineClient` to call LINE APIs:\n\n```js\nconst { LineClient } = require('messaging-api-line');\n\n// get accessToken and channelSecret from LINE developers website\nconst client = new LineClient({\n  accessToken: 'ACCESS_TOKEN',\n  channelSecret: 'CHANNEL_SECRET',\n});\n\nclient.pushText(userId, 'Hello World').then(() =\u003e {\n  console.log('pushed');\n});\n```\n\nCheck out [full API documentation](./packages/messaging-api-line/README.md) for more detail information.\n\n## Slack\n\n\u003cimg src=\"https://cdn-images-1.medium.com/max/1200/1*TiKyhAN2gx4PpbOsiBhYcw.png\" alt=\"Slack\" width=\"100\" /\u003e\n\nInstall `messaging-api-slack` package from the registry:\n\n```sh\nnpm i --save messaging-api-slack\n```\n\nor\n\n```sh\nyarn add messaging-api-slack\n```\n\nThen, create a `SlackOAuthClient` or `SlackWebhookClient` to call Slack APIs:\n\n```js\nconst { SlackOAuthClient } = require('messaging-api-slack');\n\n// get access token by setup OAuth \u0026 Permissions function to your app.\n// https://api.slack.com/docs/oauth\nconst client = new SlackOAuthClient({\n  accessToken: 'xoxb-000000000000-xxxxxxxxxxxxxxxxxxxxxxxx',\n});\n\nclient.postMessage('#random', 'Hello World').then(() =\u003e {\n  console.log('sent');\n});\n```\n\n```js\nconst { SlackWebhookClient } = require('messaging-api-slack');\n\n// get webhook URL by adding a Incoming Webhook integration to your team.\n// https://my.slack.com/services/new/incoming-webhook/\nconst client = new SlackWebhookClient({\n  url: 'https://hooks.slack.com/services/XXXXXXXX/YYYYYYYY/zzzzzZZZZZ',\n});\n\nclient.sendText('Hello World').then(() =\u003e {\n  console.log('sent');\n});\n```\n\nCheck out [full API documentation](./packages/messaging-api-slack/README.md) for more detail information.\n\n## Telegram\n\n\u003cimg src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"100\" /\u003e\n\nInstall `messaging-api-telegram` package from the registry:\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\nThen, create a `TelegramClient` to call Telegram APIs:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = new TelegramClient({\n  accessToken: '12345678:AaBbCcDdwhatever',\n});\n\nclient.sendMessage(chatId, 'Hello World').then(() =\u003e {\n  console.log('sent');\n});\n```\n\nCheck out [full API documentation](./packages/messaging-api-telegram/README.md) for more detail information.\n\n## Viber\n\n\u003cimg src=\"https://user-images.githubusercontent.com/3382565/31753411-0be75dfc-b456-11e7-9eea-b976d21fcc53.png\" alt=\"Viber\" width=\"100\" /\u003e\n\nInstall `messaging-api-viber` package from the registry:\n\n```sh\nnpm i --save messaging-api-viber\n```\n\nor\n\n```sh\nyarn add messaging-api-viber\n```\n\nThen, create a `ViberClient` to call Viber APIs:\n\n```js\nconst { ViberClient } = require('messaging-api-viber');\n\n// get authToken from the \"edit info\" screen of your Public Account.\nconst client = new ViberClient({\n  accessToken: 'AUTH_TOKEN',\n  sender: {\n    name: 'Sender',\n  },\n});\n\nclient.sendText(userId, 'Hello World').then(() =\u003e {\n  console.log('sent');\n});\n```\n\nCheck out [full API documentation](./packages/messaging-api-viber/README.md) for more detail information.\n\n## WeChat\n\n\u003cimg src=\"https://user-images.githubusercontent.com/3382565/33652361-1dc854c6-daa4-11e7-997e-e1dedd818881.jpg\" alt=\"WeChat\" width=\"100\" /\u003e\n\nInstall `messaging-api-wechat` package from the registry:\n\n```sh\nnpm i --save messaging-api-wechat\n```\n\nor\n\n```sh\nyarn add messaging-api-wechat\n```\n\nThen, create a `WechatClient` to call Wechat APIs:\n\n```js\nconst { WechatClient } = require('messaging-api-wechat');\n\n// get appId, appSecret from「微信公众平台-开发-基本配置」page\nconst client = new WechatClient({\n  appId: 'APP_ID',\n  appSecret: 'APP_SECRET',\n});\n\nclient.sendText(userId, 'Hello World').then(() =\u003e {\n  console.log('sent');\n});\n```\n\nCheck out [full API documentation](./packages/messaging-api-wechat/README.md) for more detail information.\n\n## Documentation\n\n- [Messenger](./packages/messaging-api-messenger/README.md)\n- [LINE](./packages/messaging-api-line/README.md)\n- [Slack](./packages/messaging-api-slack/README.md)\n- [Telegram](./packages/messaging-api-telegram/README.md)\n- [Viber](./packages/messaging-api-viber/README.md)\n- [WeChat](./packages/messaging-api-wechat/README.md)\n\n## Change Log\n\nEvery release, along with the migration instructions, is documented on the [CHANGELOG.md](./CHANGELOG.md) file.\n\n## License\n\nMIT © [Yoctol](https://github.com/Yoctol/messaging-apis)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbottenderjs%2Fmessaging-apis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbottenderjs%2Fmessaging-apis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbottenderjs%2Fmessaging-apis/lists"}