class_docstr: Slack input channel implementation. Based on the HTTPInputChannel.
class_docstr_tok: ["Slack","input","channel","implementation",".","Based","on","the","HTTPInputChannel","."]
docstr: Create a Slack input channel.
  
  Needs a couple of settings to properly authenticate and validate
  messages. Details to setup:
  
  https://github.com/slackapi/python-slackclient
  
  Args:
      slack_token: Your Slack Authentication token. You can create a
          Slack app and get your Bot User OAuth Access Token
          `here <https://api.slack.com/slack-apps>`_.
      slack_channel: the string identifier for a channel to which
          the bot posts, or channel name (e.g. '#bot-test')
          If not set, messages will be sent back
          to the "App" DM channel of your bot's name.
      proxy: A Proxy Server to route your traffic through
      slack_retry_reason_header: Slack HTTP header name indicating reason
          that slack send retry request.
      slack_retry_number_header: Slack HTTP header name indicating
          the attempt number.
      errors_ignore_retry: Any error codes given by Slack
          included in this list will be ignored.
          Error codes are listed
          `here <https://api.slack.com/events-api#errors>`_.
      use_threads: If set to `True`, your bot will send responses in Slack as
          a threaded message. Responses will appear as a normal Slack message
          if set to `False`.
      slack_signing_secret: Slack creates a unique string for your app and
          shares it with you. This allows us to verify requests from Slack
          with confidence by verifying signatures using your signing secret.
      conversation_granularity: conversation granularity for slack conversations.
          sender allows 1 conversation per user (across channels)
          channel allows 1 conversation per user per channel
          thread allows 1 conversation per user per thread
docstr_tok: ["Create","a","Slack","input","channel",".","Needs","a","couple","of","settings","to","properly","authenticate","and","validate","messages",".","Details","to","setup",":","https",":","\/\/github.com\/slackapi\/python-slackclient","Args",":","slack_token",":","Your","Slack","Authentication","token",".","You","can","create","a","Slack","app","and","get","your","Bot","User","OAuth","Access","Token","`","here","<","https",":","\/\/api.slack.com\/slack-apps",">","`","_",".","slack_channel",":","the","string","identifier","for","a","channel","to","which","the","bot","posts",",","or","channel","name","(","e.g",".","'","#","bot-test","'",")","If","not","set",",","messages","will","be","sent","back","to","the","``","App","''","DM","channel","of","your","bot","'s","name",".","proxy",":","A","Proxy","Server","to","route","your","traffic","through","slack_retry_reason_header",":","Slack","HTTP","header","name","indicating","reason","that","slack","send","retry","request",".","slack_retry_number_header",":","Slack","HTTP","header","name","indicating","the","attempt","number",".","errors_ignore_retry",":","Any","error","codes","given","by","Slack","included","in","this","list","will","be","ignored",".","Error","codes","are","listed","`","here","<","https",":","\/\/api.slack.com\/events-api","#","errors",">","`","_",".","use_threads",":","If","set","to","`","True","`",",","your","bot","will","send","responses","in","Slack","as","a","threaded","message",".","Responses","will","appear","as","a","normal","Slack","message","if","set","to","`","False","`",".","slack_signing_secret",":","Slack","creates","a","unique","string","for","your","app","and","shares","it","with","you",".","This","allows","us","to","verify","requests","from","Slack","with","confidence","by","verifying","signatures","using","your","signing","secret",".","conversation_granularity",":","conversation","granularity","for","slack","conversations",".","sender","allows","1","conversation","per","user","(","across","channels",")","channel","allows","1","conversation","per","user","per","channel","thread","allows","1","conversation","per","user","per","thread"]
code: def __init__(
      self,
      slack_token: Text,
      slack_channel: Optional[Text] = None,
      proxy: Optional[Text] = None,
      slack_retry_reason_header: Optional[Text] = None,
      slack_retry_number_header: Optional[Text] = None,
      errors_ignore_retry: Optional[List[Text]] = None,
      use_threads: Optional[bool] = False,
      slack_signing_secret: Text = "",
      conversation_granularity: Optional[Text] = "sender",
  ) -> None:
      """Create a Slack input channel.
  
      Needs a couple of settings to properly authenticate and validate
      messages. Details to setup:
  
      https://github.com/slackapi/python-slackclient
  
      Args:
          slack_token: Your Slack Authentication token. You can create a
              Slack app and get your Bot User OAuth Access Token
              `here <https://api.slack.com/slack-apps>`_.
          slack_channel: the string identifier for a channel to which
              the bot posts, or channel name (e.g. '#bot-test')
              If not set, messages will be sent back
              to the "App" DM channel of your bot's name.
          proxy: A Proxy Server to route your traffic through
          slack_retry_reason_header: Slack HTTP header name indicating reason
              that slack send retry request.
          slack_retry_number_header: Slack HTTP header name indicating
              the attempt number.
          errors_ignore_retry: Any error codes given by Slack
              included in this list will be ignored.
              Error codes are listed
              `here <https://api.slack.com/events-api#errors>`_.
          use_threads: If set to `True`, your bot will send responses in Slack as
              a threaded message. Responses will appear as a normal Slack message
              if set to `False`.
          slack_signing_secret: Slack creates a unique string for your app and
              shares it with you. This allows us to verify requests from Slack
              with confidence by verifying signatures using your signing secret.
          conversation_granularity: conversation granularity for slack conversations.
              sender allows 1 conversation per user (across channels)
              channel allows 1 conversation per user per channel
              thread allows 1 conversation per user per thread
      """
      self.slack_token = slack_token
      self.slack_channel = slack_channel
      self.proxy = proxy
      self.errors_ignore_retry = errors_ignore_retry or (
          "http_timeout",
      )
      self.retry_reason_header = slack_retry_reason_header
      self.retry_num_header = slack_retry_number_header
      self.use_threads = use_threads
      self.slack_signing_secret = slack_signing_secret
      self.conversation_granularity = conversation_granularity
      self._background_tasks: Set[asyncio.Task] = set()
  
      self._validate_credentials()
  
imports: import asyncio
  import hashlib
  import hmac
  from http import HTTPStatus
  import json
  import logging
  import re
  import time
  from typing import Any, Awaitable, Callable, Dict, List, Optional, Set, Text
  from rasa.core.channels.channel import InputChannel, OutputChannel, UserMessage
  from rasa.shared.constants import DOCS_URL_CONNECTORS_SLACK
  from rasa.shared.exceptions import InvalidConfigException
  import rasa.shared.utils.io
  from sanic import Blueprint, response
  from sanic.request import Request
  from sanic.response import HTTPResponse
  from slack_sdk.web.async_client import AsyncWebClient
label_desc: Use image node_id 3 to create a new SlackInput object from inherited base classes: InputChannel with example: obj = SlackInput(slack_token, slack_channel, proxy, slack_retry_reason_header, slack_retry_number_header, errors_ignore_retry, use_threads, slack_signing_secret, conversation_granularity)