This package is a Node.js wrapper for the Sendblue API. It provides a simple interface for sending and receiving messages.
You will need to get API keys by signing up for a Sendblue account. You can do so here.
npm install sendblue
import Sendblue from sendblue;
// Load your key from an environment variable or secret management service
// (do not include your key directly in your code)
SENDBLUE_API_KEY = process.env.SENDBLUE_API_KEY
SENDBLUE_API_SECRET = process.env.SENDBLUE_API_SECRET
sendblue = new Sendblue(SENDBLUE_API_KEY, SENDBLUE_API_SECRET)
const response = await sendblue.sendMessage('+19998887777', 'Hello from Sendblue!', 'invisible', 'https://source.unsplash.com/random.png', 'https://example.com/callback');
const response = await sendblue.sendGroupMessage(['+19998887777', '+19998887778'], 'Hello from Sendblue!', 'invisible', 'https://source.unsplash.com/random.png', 'https://example.com/callback');
const response = await sendblue.getMessage('messageId');
const response = await sendblue.modifyGroup('groupId', 'add_recipient', '+19998887777');
const response = await sendblue.lookup('+19998887777');
const response = await sendblue.sendTypingIndicator('+19998887777');
const response = await sendblue.getContacts();
const response = await sendblue.createContact('+19998887777', 'First Name', 'Last Name', 'Company Name');
const response = await sendblue.deleteContact('contactId');
const response = await sendblue.getMessages('contactId');