sns-node-client

1.1.0 • Public • Published

sns-node-client

A Node.JS client for the Simple Notification Service.

Please refer to the Simple Notification Service readme file for the following:

Connecting and Authentication

There is a slight difference between the Node.JS client library and the Browser based client library, and that is how you connect and authenticate with the Simple Notification Service.

As well as providing an API key, some userData and a userQuery, you will also need to provide a hostname. This hostname will be tied to the API key that you have supplied in exactly the same way as via the browser.

The way of providing this data is also slightly different:

const SNSClient = require('sns-node-client')({
  sns_host: '<YOUR_SNS_HOSTNAME>',
  authentication: {
    host: "<YOUR_AUTH_HOST>",
    key: "<YOUR_API_KEY>"
  },
  userData: {
    name: "Matt",
    age: 32,
    country: "USA",
    user_type: "chat"
  },
  userQuery: {
    country: "USA",
    user_type: "chat"
  }
});

/sns-node-client/

    Package Sidebar

    Install

    npm i sns-node-client

    Weekly Downloads

    1

    Version

    1.1.0

    License

    Apache-2.0

    Last publish

    Collaborators

    • mattcollins84