
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
messageapi-im
Advanced tools
The MessageAPI Node library provides convenient access to the MessageAPI API from applications written in server-side JavaScript.
Please keep in mind that this package is for use with server-side Node that uses MessageAPI App secret keys. To get your MessageAPI App secret you need to Sign up
See the Node API docs.
Install the package with:
npm install messageapi-im --save
The package needs to be configured with your account's secret key which you will get after Sign up. Require it with the key's value:
var messageApiIm = require('messageapi-im')('[YOUR_APP_SECRET]');
After sign up you need to complete these 3 steps to start sending messages
We have created this example using the Viber channel, to learn how to connect other channels, see the Node API docs.
messageApiIm.integrations.Create({
"type": "viber",
"auth_token": "[VIBER_AUTH_TOKEN]"
}).then(function (result) {
var integration = result.integration;
});
messageApiIm.webhooks.Create({
"webhook_url":"https://url.com"
}).then(function (result) {
var webhook = result.webhook;
});
messageApiIm.customers.Create({
"viber": {"user_id": "[USER_ID_OF_VIBER]"}
}).then(function (result) {
var customer = result.customer;
});
messageApiIm.messages.Send({
"customer_id": "<customer_id>",
"integration_id": "<integration_id>",
"data": {
"type": "text",
"content": "your text"}
}).then(function (result) {
var message = result.message;
});
See the Node API docs.
FAQs
Send and receive messages from any chat app, using one API
The npm package messageapi-im receives a total of 25 weekly downloads. As such, messageapi-im popularity was classified as not popular.
We found that messageapi-im demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.