# nexkey

> javascript sdk for nexkey's awesome lock product

Latest version **0.6.0** (published 2018-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install nexkey
pnpm add nexkey
yarn add nexkey
bun add nexkey
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2018-11-15 |
| First published | 2018-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 2 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mreinstein, retzion |

## Links

- npm: https://www.npmjs.com/package/nexkey
- Repository: https://github.com/mreinstein/nexkey
- Homepage: https://github.com/mreinstein/nexkey#readme
- Issues: https://github.com/mreinstein/nexkey/issues
- npm.io page: https://npm.io/package/nexkey

## Dependencies (2)

- [tap](https://npm.io/package/tap.md) ^12.1.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.1.2

## Recent versions

- 0.6.0 (latest) — 2018-11-15
- 0.5.0 — 2018-04-12
- 0.4.0 — 2018-04-07
- 0.3.0 — 2018-03-26
- 0.2.0 — 2018-03-22
- 0.1.0 — 2018-03-22
- 0.0.2 — 2018-03-21
- 0.0.1 — 2018-03-21

## README

# nexkey

[![Build Status](https://travis-ci.org/mreinstein/nexkey.svg?branch=master)](https://travis-ci.org/mreinstein/nexkey)

Javascript SDK for Nexkey's awesome lock product



## commonjs (node) usage

```javascript
const nexkey = require('nexkey')

const client = nexkey({
  // api credentials from nexkey beta
  NEXKEY_API_SECRET: process.env.NEXKEY_API_KEY,
  NEXKEY_API_KEY: process.env.NEXKEY_API_KEY
})


// phone and email are optional but you must send at least one
const phone = '5551236789'
const email = 'john.doe@test.com'
const result = await client.sendKey({ phone, email })

```


## es module usage

```javascript
import nexkey from 'nexkey'

const client = nexkey({
  // api credentials from nexkey beta
  NEXKEY_API_SECRET: process.env.NEXKEY_API_KEY,
  NEXKEY_API_KEY: process.env.NEXKEY_API_KEY
})


// phone and email are optional but you must send at least one
const phone = '5551236789'
const email = 'john.doe@test.com'
const result = await client.sendKey({ phone, email })

```


## staging

to access nexkey's staging API, pass an `ENVIRONMENT` property, like this:

```javascript
const client = nexkey({

  ENVIRONMENT: 'STAGING',

  // api credentials from nexkey beta
  NEXKEY_API_SECRET: process.env.NEXKEY_API_KEY,
  NEXKEY_API_KEY: process.env.NEXKEY_API_KEY
})

// use client normally here...

```


see https://api.nexkey.com/documentation for full details on the endpoints available.

---
_Source: https://npm.io/package/nexkey · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
