Open Telegram chat of specific user with text message via browser link - telegram

I would like to know if via a Browser URL I can open the Telegram chat of a specific user and at the same time pre fill the first message with a text passt over the URL.
I know that I can open the chat of a user via this link format:
https://t.me/username
Now the only thing missing is how to pass a text message. For example like this:
https://t.me/username?text=example

It's not possible as of October 2022. You can only share a URL to a user and add a message there. The only thing I found. WhatsApp does it, Telegramm not. It would be a simple code in the Android app for instance, that would open the URL scheme, but it's not implemented

Related

Firebase dynamic links not working for Firebase sign in with email link (password less)

I'm using Firebase sendSignInWithEmailLink with the url generated as part of the Firebase dynamic link.
The firebase dynamic url looks like:
e.g: https://myapp.page.link/H1c4
The url from step 1 is sent as part of sendSignInWithEmailLink
User received email and clicks on the verification link.
At the end of redirection I can see that the url contains the oobCode as shown below:
https://myapp.page.link/H1c4?apiKey=&oobCode=YG2N2eLU4qGBsDeLU5cVsDrzF9qwkGzoUepInuA9pm0AAAFtfk41Nw&mode=signIn&lang=en
When my app receives the dynamic link finally, it is loosing the oobCode. My app gets
https://myapp.page.link/uEOBUnv1k4XclzwfsT5NXnGBgAA3/
The part after link/ is a custom data which I used while generating the link in step 1.
When I use isSignInWithEmailLink for validating the link in step 5, I get the result as FALSE indicating it's not a valid email link.
But if I provide the full URL from step 4 in the code(manually), the isSignInWithEmailLink returns TRUE.
I think I've done all required but Firebase dynamic link is not persisting the oobCode as part of the link sent to the app on the device.
Has anyone seen this and know what could be the problem? keen to get feedback here before reporting as an issue in Github.
Cheers
Are you using a custom dynamic link with a path, eg. https://myapp.page.link/H1c4? If so, that is currently not supported with Firebase Auth. Only custom domains with no paths are supported, eg. https://myapp.page.link.

Update Telegram link preview programmatically

I have a bot which creates messages including some urls provided by users.
Telegram creates link previews for those urls. The previews are cached.
Sometimes the content of the url changes, then the preview provided by Telegram is outdated. So I need to update the link preview provided by Telegram.
Telegram link previews can be updated using https://telegram.me/webpagebot. But according to Telegram Bot API, a bot can't talk to another bot to avoid infinite loops. So opening a chat between my bot and webpagebot to request the update is not an option.
How could I force the update of a link preview from my bot? Is there some http request, API, or whatever to do it programmatically?
You may add a randomly generated variable to the end of the link, so Telegram looks a link as a new link, like this:
Suppose a old link is like:
https://example.com/offers/106-tatasky-recharge
If you change og_image, title, meta description of this page, then use the above link as:
https://example.com/offers/106-tatasky-recharge?t=18121980
I think, it solves the problem.

Telegram URL schema: which url to trigger the client to open the "share/send to" dialogue

I am working on an telegram bot, and looking for the exact URL schema to popup the "Share / Select Group / Send to" dialogue in the telegram client.
I have seen this link in #pollbot, for which I took following screenshots.
A bit more details:
What I want is to give end-user an easy way to add the bot to their group, just like what PollBot does: When a poll being created, PollBot will return a special like to the user. Any by clicking that link, the user could easily add PollBot to a group. So I'm looking for the exact URL schema of that link.
I then check that link PollBot sent to me in telegram web client, and found out it's a tg protocol url: tg://resolve?domain=PollBot&startgroup=5148bed5f90678b93246464b3e132052. So I tried to resend this url via bot.sendMessage. But it turned out Telegram api server won't parse the tg://resolve url.
So, how could the bot manage to send such a link to the user?
The link there works with deeplinking, please read about it here:
https://core.telegram.org/bots#deep-linking
the url has the following scheme:
https://telegram.me/<YourBotUsername>?startgroup=<Payload>
the startgroup part (parameter) of the url tells telegram to open the 'add to group' dialog.
when you choose a group there (and you can add bot's to it) the bot will be added to the group and /start PAYLOAD will be send to that group.
The Payload is what you defined as value of the startgroup parameter, so your bot can assosiate it with something and send the matching reply.
please mind, that the Payload can only contain certain characters and don't mind that the telegram clients might internaly convert that link to an tg:// url.
you can also use start instead of startgroup to open a private chat.

Skype bot can not be added to group chat

I'm developing a bot for Skype and enabled setting that allows to add this bot to Group Chats. However, when I click to "Add People" button, I can see only the real people, but Skype Bots are hidden there (even the official ones).
There is an official doc that Skype bot can be added to the group chat as regular Skype account, but I am not able to do it.
My bot is not published, but one on one conversation works well. Also, in the private chat with Bot I can add people to conversation and thus I can create a group with this bot, but the main question is how to add the bot to the existing group chat?
On the configuration page for Skype on the dev.botframework.com site. Make sure you've enabled group messaging:
Additional information about groups on skype can be found here.
Finally I was able to add it to the group by opening Web Skype and then opening the private chat with my Bot.
Web Skype showed me a message "Add SkotBot to your contacts" which is very strange because it was already on my contact list. After clicking to this link bot is displayed on the "Add People" list.
I had the similar issues. and I try your method/suggestion above, it works!
the exact steps for other to read on (based on your suggestion)
1. from Mac Client Skype, I'm using version 7.43 (241) make a 1:1 chat with my bot. (to make it appears on the chat history on web skype later)
2. login the web skype, it will appear as history/conversation on the left. Message sending is disabled. Clicking on the bot icon appears on the chat screen above, it will open the profile
3. Add the bot to contact.
4. Then the bot can be added to the existing group conversation, just like add a normal human contact.
It seems to be some bugs in the Skype ecosystem?

Tracking an email

I am developing a bulk mail management project in ASP.NET. I want to track who opened my mails. I know that this can be done by embedding a small transparent image in my mail. So whenever the receiver opens the mail the image is automatically downloaded from my server. But I have no idea that how can I get to know that image is getting downloaded from my server and which mail id is downloading it. Please help me as early as possible.
Send email as html
Include somthing like
http://www.myserver.com/counter.aspx?userid=xxxxx'>
You may need to add some additional parameter to url, like email id to make sure you log only once, not every time user open an email
Inside counter.aspx run the code to log user and then output some image in the response.
I got another way out to get open statistics in following link:
http://www.aspnetemail.com/samples/emailtracker/default.aspx

Resources