🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@edgepush/sdk

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@edgepush/sdk

Official Node/TypeScript SDK for edgepush. Send push notifications to iOS and Android with a single API.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

@edgepush/sdk

Official Node/TypeScript SDK for edgepush. Send native iOS and Android push notifications through a single API.

Install

npm install @edgepush/sdk
# or
pnpm add @edgepush/sdk
# or
bun add @edgepush/sdk

Quick start

import { Edgepush } from "@edgepush/sdk";

const client = new Edgepush({
  apiKey: "io.akshit.myapp|abc123...", // from the edgepush dashboard
});

// Send a single message
const ticket = await client.send({
  to: deviceToken, // APNs hex token or FCM registration token
  title: "Hello",
  body: "World",
  data: { url: "myapp://home" },
});

// Poll the delivery receipt
const receipt = await client.getReceipt(ticket.id);
console.log(receipt.status); // "queued" | "sending" | "delivered" | "failed" | "expired"

Batch sends

const tickets = await client.sendBatch([
  { to: token1, title: "Hi", body: "First" },
  { to: token2, title: "Hi", body: "Second" },
]);

// Poll all receipts in a single call
const receipts = await client.getReceipts(tickets.map((t) => t.id));

Environments

The SDK is isomorphic. It works in:

  • Node.js (>= 18)
  • Bun
  • Deno
  • Cloudflare Workers
  • Browsers (CORS allowed, but you should rarely send pushes from a browser)

Error handling

import { Edgepush, EdgepushError } from "@edgepush/sdk";

try {
  await client.send({ to: deviceToken, title: "Hi" });
} catch (err) {
  if (err instanceof EdgepushError) {
    console.error(`edgepush ${err.status}: ${err.code}`);
  }
  throw err;
}

License

MIT

Keywords

push-notifications

FAQs

Package last updated on 13 Apr 2026

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