
Put the following to your slack.py inside your app's directory. ( 'example', require_linked_account = True ) def scrumie_staging_command ( request, slack_user_mapping, slack_workspace ): print ( slack_user_mapping, slack_workspace ) return JsonResponse () Slack Interactivity

If you want to create a new Slack command with name /example, configure your Request URL as /slack/commands/example/ and put the following code into slack.py inside your app's directory. (Optional) Configure your Slash commands's Request URL as /slack/commands// (Optional) Put /slack/interactivity/ as your Request URL in Interactive Components section This project provides easy-to-use integration between Django projects and the Slack group chat and IM tool, allowing your website to update your team the moment. Update your settings.py SLACK_CLIENT_ID = "" SLACK_CLIENT_SECRET = "" SLACK_SIGNING_SECRET = "" SLACK_LOGIN_OAUTH_REDIRECT_URL = "" SLACK_INSTALL_OAUTH_REDIRECT_URL = ""Īdd following URLs to your Slack app's Redirect URLs (OAuth & Permissions) /slack/oauthcallback/ Run python manage.py migrate to create the slack_app models.Īdd slack_app.auth_backends.SlackAuthenticationBackend to your AUTHENTICATION_BACKENDS AUTHENTICATION_BACKENDS = Basic environments such as LAMP, Ruby on Rails, JSP, Django, Node. Include the urls in your project urls.py like this: path('slack/', include('slack_app.urls')), Views - OAuth callbacks for "Add To Slack" and "Login With Slack" actionsĪdd 'slack_app' to your INSTALLED_APPS setting like this: INSTALLED_APPS =.

Authorisation backend - allows you to pair your existing user model with your Slack users.Decorators - help you to write implementation of your Slack endpoints.Models - needed to keep information from Slack API.This application helps you to integrate your existing Django application with Slack.
