# slack-inviter

> A little server that enables existing slack team members to invite new members to a Slack server via a slash command.

Latest version **0.0.1** (published 2016-01-31) · 0 weekly downloads

## Install

```sh
npm install slack-inviter
pnpm add slack-inviter
yarn add slack-inviter
bun add slack-inviter
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-01-31 |
| First published | 2016-01-31 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Known vulnerabilities | 0 (+11 in 4 direct dependencies) |
| Install scripts | no |
| Maintainers | tikotzky |

## Links

- npm: https://www.npmjs.com/package/slack-inviter
- npm.io page: https://npm.io/package/slack-inviter

## Dependencies (14)

- [jade](https://npm.io/package/jade.md) ~1.11.0
- [debug](https://npm.io/package/debug.md) ~2.2.0
- [eslint](https://npm.io/package/eslint.md) ^1.10.3
- [morgan](https://npm.io/package/morgan.md) ~1.6.1
- [express](https://npm.io/package/express.md) ~4.13.1
- [body-parser](https://npm.io/package/body-parser.md) ~1.13.2
- [email-regex](https://npm.io/package/email-regex.md) ^1.0.0
- [cookie-parser](https://npm.io/package/cookie-parser.md) ~1.3.5
- [serve-favicon](https://npm.io/package/serve-favicon.md) ~2.3.0
- [babel-register](https://npm.io/package/babel-register.md) ^6.4.3
- [request-promise](https://npm.io/package/request-promise.md) ^2.0.0
- [babel-preset-stage-2](https://npm.io/package/babel-preset-stage-2.md) ^6.3.13
- [eslint-config-airbnb](https://npm.io/package/eslint-config-airbnb.md) ^4.0.0
- [babel-preset-es2015-node](https://npm.io/package/babel-preset-es2015-node.md) ^5.0.2

## Recent versions

- 0.0.1 (latest) — 2016-01-31

## README

# slackin

A little server that enables existing slack team members
to invite new members to a Slack server via a slash command.

For example once installed any user can run a slash command like
```
/invite_user foo@bar.com
```
to invite another user to the team.

## How to use

### Server

#### Heroku

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/tikotzky/slack-inviter/)

#### Custom

Install it and launch it on your server:

```bash
$ git clone git@github.com:tikotzky/slack-inviter.git
$ cd slack-inviter
$ npm install
$ npm start --  "your-team-id" "your-slack-token" "slash-command-token"
```

Your team id is what you use to access your login page on Slack (eg: https://**{this}**.slack.com).

You can find your slack API token at [api.slack.com/web](https://api.slack.com/web) – note that the user you use to generate the token must be an admin. It's best to create a dedicated `@invitebot` user (or similar), mark that user an admin, and use a token from that dedicated admin user.

You'll get a slash command token when you create a slash command [here](https://slack.com/apps/A0F82E8CA-slash-commands)

## API

Requiring `slack-inviter` as a module will return
an express `Router` that can be mounted at 
any route in an existing express app.

For example to mount it at `/slack-invite` in an existing express app
you would use it like this.
```js
import inviteRoute from 'slack-inviter';
app.use('/slack-invite', inviteRoute);
```

## Credits

- The invite code was taken from [rauchg/slackin](https://github.com/rauchg/slackin)

## License

MIT

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