aiogram python. Is it possible to determine which reference the user used when entering Telegram?



  • I'm writing a bet for Telegram, and I've got a question at some point: Is it possible to determine which link the user has joined the channel?



  • Try it. https://docs.aiogram.dev/en/latest/utils/deep_linking.html?highlight=link#aiogram.utils.deep_linking.get_start_link ♪


    In payload, we're rolling out any parameters that are then accepted by the team processor. /start

    async def get_start_link(payload: str, encode=False) -> str:
        """
        Get 'start' deep link with your payload.
    
    If you need to encode payload or pass special characters -
        set encode as True
    
    :param payload: args passed with /start
    :param encode: encode payload with base64url
    :return: link
    """
    return await _create_link(
        link_type="start",
        payload=payload,
        encode=encode,
    )
    

    It'll give you a link.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2