skip to Main Content

Here I found a very useful answer showing how to send a pre-filled message from a website using whatsapp.

Can we do the same with Telegram?

2

Answers


  1. You can try to use open a Telegram chat with:

    1. https://t.me/username
    2. tg://resolve?domain=username

    And send a message to your contact with tg://msg?text=Text&to=+(user mobile number)

    But sending not works for me.

    Login or Signup to reply.
  2. All of these URLs should be valid…

    https://t.me/share/url?url={url}&text={text}
    https://telegram.me/share/url?url={url}&text={text}
    tg://msg_url?url={url}&text={text}
    

    The official API documentation source: Core.Telegram.org: Widgets -> Sharing Button

    They suggest the t.me format. You may prefill the following fields:

    • url : The URL you want to share.
    • text : Text to accompany the URL you want to share.

    So, for instance, you might have…

    https://t.me/share/url?url=http%3A%2F%2Fwww.revoltlib.com%2F&text=Revolt+Library

    If you are interested in watching a project that keeps track of these URLs, then check us out!: https://github.com/bradvin/social-share-urls#telegramme

    Social Share URLs

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search