Socket
Book a DemoInstallSign in
Socket

@tilli-pro/nudge.js

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tilli-pro/nudge.js

> A nudge in time saves nine

latest
npmnpm
Version
0.1.0
Version published
Maintainers
2
Created
Source

nudge.js

A nudge in time saves nine

The nudge.js SDK is a lightweight (ZERO dependencies) wrapper around nudge and its APIs.

Getting Started

The nudge.js SDK clients come in 2 flavors:

  • The fully featured nudge.js client that exposes all API capabilities within nudge
  • The "Send" client which specifically only supports sending real-time nudges

To use the nudge.js SDK you need either an API key (for sending real-time nudges via the "Send" client) or the user credentials used to log into app.nudge.net (all other functionality).

[!TIP] If you're not sure how to get an API key, you can read more here: Nudge API Documentation

In either case, getting started is the same:

import { createSendClient, createClient } from "@tilli-pro/nudge.js";

const apiKey = ""; // get this from the nudge dashboard
const sendClient = createSendClient({ apiKey });

// credentials used to login to app.nudge.net
const authCredentials = {
  email: "",
  password: "",
};
const client = createClient({ apiKey, authCredentials });

The clients can be used immediately for sending real-time nudges:

sendClient.send({
  nudgeId: "1234" // you can get this from the nudge dashboard,
  recipient: {
    email: "ibrahims@tilli.pro",
    name: "Ibrahim Ali", // OPTIONAL
  },
  options: { // OPTIONAL
    cc: ["michaelv@tilli.pro"] // OPTIONAL
    bcc: ["avdhoots@tilli.pro"] // OPTIONAL
  },
  mergeTags: { // OPTIONAL
    productName: "tilliX",
  },
  files: [ // OPTIONAL
    new File(["test_document_text"], "test_document.txt", { type: "text/plain" }),
  ],
})

That's it. Your nudge has been sent.

Keywords

transactional email

FAQs

Package last updated on 11 Jun 2025

Did you know?

Socket

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.

Install

Related posts