Socket
Book a DemoInstallSign in
Socket

@ding-live/sdk

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ding-live/sdk

The official Ding SDK

2.0.0
latest
Source
npmnpm
Version published
Weekly downloads
842
234.13%
Maintainers
1
Weekly downloads
 
Created
Source

Ding Javascript SDK

Version

The Ding Javascript SDK allows Javascript backends to access the Ding API programmatically.

Requirements

Node 12 or higher.

Installation

Install the package with:

npm install @ding-live/sdk --save
# or
yarn add @ding-live/sdk

Usage

The package needs to be configured with your account's UUID and your secret key. Ping hello@ding.live to get them.

import ding, { DeviceType } from "@ding-live/sdk";
const client = new Ding("<CUSTOMER_UUID>", "<SECRET_TOKEN>");

// Authenticate
const auth = await client.authenticate("+12065550100");

// Check the code the user entered
const check = await client.check(auth.uuid, "1234");

// Retry the auth
const retry = await client.retry(auth.uuid);

More options

// Authenticate with metadata to increase spam detection
client
  .authenticate("+12065550100", {
    ip: "192.168.0.1",
    deviceId: "asd8789asf76a98sdf6sdf7s7d8",
    deviceType: DeviceType.Ios,
    appVersion: "1.0",
    callbackUrl: "<YOUR_CALLBACK_URL>",
  })
  .then(console.debug);

Keywords

ding

FAQs

Package last updated on 21 Sep 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.