Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

magicbell

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magicbell

MagicBell API wrapper

  • 4.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.9K
decreased by-5.28%
Maintainers
0
Weekly downloads
 
Created
Source

MagicBell Node.js/JavaScript Library

This package provides a convenient interface to query the MagicBell API. Note that some methods depend on your secret key, those methods are not to be used in browsers, as your secret key must be kept secret.

Requirements

Node 18.13 or higher.

When using older versions, you might need to polyfill fetch. See isomorphic-fetch for more information.

You also might need to polyfill eventsource when using the listen method in an environment that doesn't support it. See eventsource for more information.

Installation

Install the package with npm:

npm install magicbell --save

or yarn:

yarn add magicbell

Usage

The package needs to be configured with your project's secret key & api key, which are available in the [MagicBell Dashboard][dashboard].

import { ProjectClient } from 'magicbell/project-client';

const magicbell = new ProjectClient({
  apiKey: 'your-api-key',
  apiSecret: 'your-api-secret',
});

try {
  const broadcast = await magicbell.broadcasts.create({
    title: 'Sweet!',
    content: 'When you see it, you know it!',
    recipients: [{ email: 'customer@example.com' }],
  });
  console.log(broadcast.id);
} catch (error) {
  console.error(error);
}

Documentation

Please see the MagicBell documentation for more information about this SDK.

Keywords

FAQs

Package last updated on 16 Sep 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc