6

I'm trying to identify each user by some unique key, which is added to /start command. For each user, I will generate some key, and show URL to the user. This is described step by step in the official documentation https://core.telegram.org/bots#deep-linking

Link for the users is in the format:

https://telegram.me/ExampleBot?start=uniqueKey

It works perfectly in the telegram app. The probem is, that when opened in the browser, only button "Start" is visible. When the user clicks, the uniqueKey is not send to the bot.

How to add a uniqueKey to /start command to make it work in telegram web app too? How should look like the generated URL? So user can just click, and does not need to write the code?

asked Jan 6, 2018 at 11:21
6
  • 1
    You can't create bot without a Human account. And every account can only have 20 bots quota. Commented Jan 6, 2018 at 12:33
  • Thanks, that what I was afraid of. So I need to use core.telegram.org/api#telegram-api instead of telegram bot api? Commented Jan 6, 2018 at 12:38
  • Make your uniqueKey as Base64 and test again. Commented Jan 21, 2018 at 2:43
  • Looks like, it works :-), thanks, just need to do more tests! Now I see, it's stated in the documentation "We recommend using base64url to encode parameters with binary and other types of content." Commented Jan 21, 2018 at 17:37
  • @RAM post it as an answer, I will then accept the answer and give you the bounty Commented Jan 21, 2018 at 17:40

1 Answer 1

4
+150

Make your uniqueKey as Base64 and test again...

Based on Telegram documents it is recommended to using base64url to encode parameters with binary and other types of content.

answered Jan 22, 2018 at 0:50
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.