Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
rcsbusinessmessaging
Advanced tools
RCS Business Messaging upgrades SMS with branding, rich media, interactivity, and analytics. With RCS, businesses can bring branded, interactive mobile experiences, right to the native Android messaging app.
This document contains an API reference, samples, and other resources useful to developing Node.js applications. For additional help developing RCS Business Messaging applications, in Node.js and other languages, see our RCS Business Messages quickstart guide.
The documentation for the RCS Business Messaging API can be found here.
npm install rcsbusinessmessaging
const SERVICE_ACCOUNT_PUBLIC_KEY = 'REPLACE_ME';
// Get the RCS Business Messaging client library helper
const rbmApiHelper = require('rcsbusinessmessaging/rbm_api_helper');
rbmApiHelper.initRbmApi(SERVICE_ACCOUNT_PUBLIC_KEY);
/**
* Posts a message of "Hello, World!" to the RCS Business Messaging API.
*
* @param {string} phoneNumber An RCS-enabled device.
*/
async function sendMessage(phoneNumber) {
rbmApiHelper.sendMessage({
messageText: 'Hello, World!',
msisdn: phoneNumber
});
}
sendMessage('valid-rcs-enabled-phone-number');
Samples below assume a similar library initialization as shown in the Using the client library section.
// Create the payload for sending a message of "Hello, World!"
rbmApiHelper.sendMessage({
messageText: 'Hello, World!',
msisdn: phoneNumber
});
// Create the payload for sending a message of "Hello, World!" along with
// a suggested reply and two suggested actions
rbmApiHelper.sendMessage({
messageText: 'Hello, World!',
msisdn: phoneNumber,
suggestions: [
{
reply: {
text: 'Sample Chip',
postbackData: 'sample_chip',
},
},
{
action: {
text: 'URL Action',
postbackData: 'url_action',
openUrlAction: {
url: 'https://www.google.com',
},
},
},
{
action: {
text: 'Dial Action',
postbackData: 'dial_action',
dialAction: {
phoneNumber: '+12223334444',
},
},
},
]
}
);
// Create the payload for sending a rich card
rbmApiHelper.sendRichCard({
messageText: 'Hello, world!',
messageDescription: 'RBM is awesome!',
msisdn: phoneNumber,
suggestions: [
{
reply: {
'text': 'Suggestion #1',
'postbackData': 'suggestion_1',
},
},
{
reply: {
'text': 'Suggestion #2',
'postbackData': 'suggestion_2',
},
},
],
imageUrl: 'http://www.google.com/logos/doodles/2015/googles-new-logo-5078286822539264.3-hp2x.gif',
height: 'TALL',
});
// Create the payload for sending a carousel
rbmApiHelper.sendCarouselCard({
msisdn: phoneNumber,
cardContents: [
{
title: 'Card #1',
description: 'The description for card #1',
suggestions: [
{
reply: {
text: 'Card #1',
postbackData: 'card_1',
}
}
],
media: {
height: 'MEDIUM',
contentInfo: {
fileUrl: 'https://storage.googleapis.com/kitchen-sink-sample-images/cute-dog.jpg',
forceRefresh: false,
},
},
},
{
title: 'Card #2',
description: 'The description for card #2',
suggestions: [
{
reply: {
text: 'Card #2',
postbackData: 'card_2',
}
}
],
media: {
height: 'MEDIUM',
contentInfo: {
fileUrl: 'https://storage.googleapis.com/kitchen-sink-sample-images/elephant.jpg',
forceRefresh: false,
},
},
},
});
This library follows Semantic Versioning.
This library is considered to be General Availability (GA). This means it is stable; the code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against GA libraries are addressed with the highest priority.
Contributions welcome! See the Contributing Guide.
Apache Version 2.0
See LICENSE
FAQs
Client library for Google's RCS Business Messaging API
The npm package rcsbusinessmessaging receives a total of 50 weekly downloads. As such, rcsbusinessmessaging popularity was classified as not popular.
We found that rcsbusinessmessaging 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.