text: from __future__ import absolute_import
  from __future__ import division
  from __future__ import unicode_literals
  
  import logging
  import asyncio
  import asyncio
  import inspect
  from sanic import Sanic, Blueprint, response
  from sanic.request import Request
  from sanic.response import HTTPResponse
  from typing import Text, Dict, Any, Optional, Callable, Awaitable, NoReturn
  
  import rasa.utils.endpoints
  from rasa.core.channels.channel import (
      InputChannel,
      CollectingOutputChannel,
      UserMessage,
  )
  
  class WebsiteConnector(InputChannel):
      def name(cls) -> Text:
          """Name of your custom channel."""
          return "website_connector"
      
      def blueprint(
          self, on_new_message: Callable[[UserMessage], Awaitable[None]]
      ) -> Blueprint:
          
          custom_webhook = Blueprint(
              "custom_webhook_{}".format(type(self).__name__),
              inspect.getmodule(self).__name__,
              )
          
          @custom_webhook.route("/", methods=["GET"])
          async def health(request: Request) -> HTTPResponse:
              return response.json({"status": "ok"})
          
          @custom_webhook.route("/webhook", methods=["POST"])
          async def receive(request: Request) -> HTTPResponse:
              sender_id = request.json.get("sender") # method to get sender_id
              text = request.json.get("message") # method to fetch text
              input_channel = self.name() # method to fetch input channel
              
              
              collector = CollectingOutputChannel() #output channel
              
              await on_new_message(
                  UserMessage(
                      text,
                      collector,
                      sender_id,
                      input_channel=input_channel,
                      )
                  )
              #print(collector)
              #return response.json({"status": "ok"})
              return response.json(collector.messages)
          
          return custom_webhook
              
              