Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
The documentation for the TNZ API can be found here.
tnzapi
uses a modified version of Semantic Versioning for all changes. See this document for details.
This library supports the following NodeJS implementations:
Install from npm using npm, a package manager for NodeJS.
npm i tnzapi
You may need to run the above commands with sudo
.
Getting started with the TNZ API couldn't be easier. Create a
Client
and you're ready to go.
The TNZAPI
needs your TNZ API credentials. You can either pass these
directly to the constructor (see the code below) or via environment variables.
const tnzapi = require('./tnzapi');
const client = tnzapi()
client.Sender = "user@example.com"
client.APIKey = "ABC123"
const tnzapi = require('tnzapi');
const client = new tnzapi({
"Sender": "user@example.com",
"APIKey": "ABC123"
});
var request = client.Send.Email({
"EmailSubject": "NodeJS Test",
"MessagePlain": "Test Email",
"Destinations": [{"Recipient":"recipient@example.com"}]
});
var callback = function(data) {
console.log("Response:",JSON.stringify(data, null, " "));
}
request.SendMessage(callback);
const tnzapi = require('tnzapi');
const client = new tnzapi({
"Sender": "user@example.com",
"APIKey": "ABC123"
});
var request = client.Send.SMS({
"Reference": "Test",
"Message": "Test SMS Message click [[Reply]] to opt out",
"Destinations": [{"Recipient":"+64211231234"}]
});
var callback = function(data) {
console.log("Response:",JSON.stringify(data, null, " "));
}
request.SendMessage(callback);
const tnzapi = require('tnzapi');
const client = new tnzapi({
"Sender": "user@example.com",
"APIKey": "ABC123"
});
var request = client.Send.Fax({
"Reference": "Test Fax",
"Destinations": [{"Recipient":"+6491232345"}]
});
request.AddAttachment("C:\\Document.pdf");
var callback = function(data) {
console.log("Response:",JSON.stringify(data, null, " "));
}
request.SendMessage(callback);
const tnzapi = require('./tnzapi');
const client = new tnzapi({
"Sender": "user@example.com",
"APIKey": "ABC123"
});
var request = client.Send.TTS({
"Reference": "Voice Test - 64211232345",
"MessageToPeople": "Hi there!",
"Destinations": [{"Recipient":"+64211232345"}]
});
request.AddKeypad(1,"+6499293000","You pressed 1");
var callback = function(data) {
console.log("Response:",JSON.stringify(data, null, " "));
}
request.SendMessage(callback);
const tnzapi = require('tnzapi');
const client = new tnzapi({
"Sender": "user@example.com",
"APIKey": "ABC123"
});
var request = client.Send.Voice({
"Reference": "Voice Test - 64211232345",
"Destinations": [{"Recipient":"+64211232345"}]
});
request.AddVoiceFile("MessageToPeople","C:\\file1.wav");
request.AddVoiceFile("MessageToAnswerPhones","C:\\file2.wav");
request.AddKeypad(1,"+6491232345","C:\\file3.wav");
var callback = function(data) {
console.log("Response:",JSON.stringify(data, null, " "));
}
If you need help installing or using the library, please check the TNZ Contact if you don't find an answer to your question.
FAQs
Node.js Library for TNZ Group REST API
The npm package tnzapi receives a total of 925 weekly downloads. As such, tnzapi popularity was classified as not popular.
We found that tnzapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.