Coder Social home page Coder Social logo

isabella232 / template-account-binding Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slackapi/template-account-binding

0.0 0.0 0.0 49 KB

A sample Slack app that shows you how to bind a Slack user to a user on another system

License: MIT License

JavaScript 85.58% CSS 0.37% HTML 14.05%

template-account-binding's Introduction

Account Binding Template

A Sample Slack app that shows how a user account on Slack can be bound to an account on another system.

account-binding

Setup

Create a Slack app

  1. Create an app at api.slack.com/apps
  2. Click on Bot Users
  3. Add a bot user and make sure it displays as always online
  4. Install the app and copy the xoxb- token

Run locally or Remix on Glitch

  1. Get the code
  2. Set the following environment variables to .env (see .env.sample):
    • SLACK_BOT_TOKEN: Your app's xoxb- token (available on the Install App page)
    • SLACK_VERIFICATION_TOKEN: Your app's Verification Token (available on the Basic Information page)
    • SESSION_SECRET: A randomly generated secret for your session storage
  3. If you're running the app locally:
    1. Start the app (npm start)
    2. In another windown, start ngrok on the same port as your webserver (ngrok http $PORT)

Add Slash Commands

  1. Go back to the app settings and click on Slash Commands
  2. Add the following Slash Commands:
    • Command: /read-message
      • Request URL: ngrok or Glitch URL + api/slack/command
      • Description: Read secret message
    • Command: /write-message
      • Request URL: ngrok or Glitch URL + api/slack/command
      • Description: Write secret message
      • Usage Hint: [message]
  3. Reinstall the app by navigating to the Install App page

In Slack

  1. In any channel, run /read-message
  2. You should see a DM from the bot asking you to link your accounts

template-account-binding's People

Contributors

aoberoi avatar colmdoyle avatar sachinr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.