Skip to content

Latest commit

 

History

History
44 lines (25 loc) · 1.78 KB

slack.md

File metadata and controls

44 lines (25 loc) · 1.78 KB

JoSend Slack App

JoSend uses slash command to send requests to the backend, and the backend takes care of all the functionalities, such as creating wallets, sending SOLs, etc. Therefore, this article will focus on how to create a slack slash command app.

Creating a Slack app

Follow the official tutorial, Getting started, from Creating a Slack app to Installing your app.

Pay attention to Requesting scopes. We need 2 Bot Token Scopes:

  • chat:write: enable the backend to send the responses to slack

  • commands: enable slash command.

josend-slack-app-scopes

Adding Slash command

Since we work on local machine, Slack doesn't know the IP address of your device. We need a proxy, ngrok. Let's install it.

Once you start your local JoSend, you can start ngrok.

ngrok http 3030

Following addresses will appear in the console. You can choose either of them (https is recommended) as the root URL.

ngrok-proxy

Now, we can add slash commands. For example, let's create a /send-sol command. The request URL is:

https://665a-176-158-55-131.ngrok.io/slack/send-sol

slack-send-sol-command

The full endpoints are shown in http://localhost:3030/api/#/slack.

References