Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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 = new 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, " "));
}
request.SendMessage(callback);
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 1,369 weekly downloads. As such, tnzapi popularity was classified as 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.