Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with start_params #631

Open
kasrakhamesi opened this issue Aug 25, 2024 · 22 comments
Open

problem with start_params #631

kasrakhamesi opened this issue Aug 25, 2024 · 22 comments

Comments

@kasrakhamesi
Copy link

in this url for example : https://t.me/mybot?startapp=bbId38341612

when open it with telegram desktop, WebApp.initDataUnsafe.start_param working fine and get bbId38341612

but when I want open that with iphone 13 , always WebApp.initDataUnsafe.start_param is undefined, my project on react.js

and "@twa-dev/sdk": "^7.0.0",
help me to fix that

I check TelegramMessenger/Telegram-iOS#1091

but still have problem

@Falasbyby
Copy link

I have the same problem =(

@levlam
Copy link
Contributor

levlam commented Aug 26, 2024

What is your app version?

@Studiobaraban
Copy link

I have the same problem =(

@Falasbyby
Copy link

What is your app version?

last

@levlam
Copy link
Contributor

levlam commented Aug 27, 2024

"last" isn't a version of an app.

@Falasbyby
Copy link

I work in unity (webgl) via telegram bot mini api
July 31, 2024
Bot API 7.8

@Falasbyby
Copy link

in this url for example : https://t.me/mybot?startapp=bbId38341612

when open it with telegram desktop, WebApp.initDataUnsafe.start_param working fine and get bbId38341612

but when I want open that with iphone 13 , always WebApp.initDataUnsafe.start_param is undefined, my project on react.js

and "@twa-dev/sdk": "^7.0.0", help me to fix that

I check TelegramMessenger/Telegram-iOS#1091

but still have problem

I have solved this problem!!!
/newapp in the bot wrote and filled in all the data!

t.me/My_bot - was
t.me/My_bot/appname - became

@bobpepers
Copy link

bobpepers commented Sep 23, 2024

same issue,
"?startapp=command" works on fine on desktop to fill start_param
but when i try using this on android then start_param stays undefined

@levlam
Copy link
Contributor

levlam commented Sep 23, 2024

@bobpepers

What is your exact app version?
What link do you use for testing?

@bobpepers
Copy link

bobpepers commented Sep 24, 2024

@bobpepers

What is your exact app version? What link do you use for testing?

I'm building a React application using the latest version of @twa-dev/sdk (v7.10.1). My test link is: https://t.me/SecretTip_dev_bot?startapp=SecretTip

The following code works fine on desktop (Ubuntu 24.04):

await ctx.replyWithHTML(message, {
  reply_markup: {
    inline_keyboard: [
      [
        {
          text: 'Open Mini App',
          url: miniAppUrl, // URL that opens the mini-app directly in Telegram
        },
      ],
    ],
  },
});

However, when testing on Android, the start_param is not available when using the startapp=testParameter. One key requirement for my Telegram mini-app is that it needs to be opened from a Telegram group because I rely on the initData to determine the group from which the app was initiated.

I haven't tested this on any other operating systems yet.

@skrradev
Copy link

Is bug fixed? Maybe some workarounds?

@VietnameseRick
Copy link

VietnameseRick commented Sep 26, 2024

for anyone having problem like this, try talk to BotFather and setup a webapp for your bot using /newapp. After finish, depends on your setting the link will be like t.me/bot_name/webapp_name then when you open t.me/bot_name/webapp_name?startapp=Rick your webapp will be able to get startapp params as Rick

@bobpepers
Copy link

for anyone having problem like this, try talk to BotFather and setup a webapp for your bot. After finish, depends on your setting the link will be like t.me/bot_name/webapp_name then when you open t.me/bot_name/webapp_name?startapp=Rick your webapp will be able to get startapp params

This was it. I didn’t realize setting up a web app through BotFather was something I had to do. It worked fine on desktop, so I didn’t catch that it was necessary step for phones. Thank you.

@AlansaladA
Copy link

for anyone having problem like this, try talk to BotFather and setup a webapp for your bot. After finish, depends on your setting the link will be like t.me/bot_name/webapp_name then when you open t.me/bot_name/webapp_name?startapp=Rick your webapp will be able to get startapp params

I have ennabled the miniapp in the bot settings, but I still can't get the start_param in iOS and Android

@AlansaladA
Copy link

for anyone having problem like this, try talk to BotFather and setup a webapp for your bot. After finish, depends on your setting the link will be like t.me/bot_name/webapp_name then when you open t.me/bot_name/webapp_name?startapp=Rick your webapp will be able to get startapp params

This was it. I didn’t realize setting up a web app through BotFather was something I had to do. It worked fine on desktop, so I didn’t catch that it was necessary step for phones. Thank you.

Hi @bobpepers ,Can you tell me where webapp_name is set?

@AlansaladA
Copy link

If you want to get the webapp_name, use /newapp to create an app for your bot.

@belyaev-dev
Copy link

Still getting this error on Telegram for Android v11.1.3 (5243)

When opening miniapp using t.me/bot_name?startapp=testParameter - start_param is available on Windows Desktop, but unavailable on MacOS Desktop, iOS and Android

Default webapp t.me/bot_name/webapp_name?startapp=testParameter works fine

@ami-in
Copy link

ami-in commented Oct 7, 2024

in this url for example : https://t.me/mybot?startapp=bbId38341612
when open it with telegram desktop, WebApp.initDataUnsafe.start_param working fine and get bbId38341612
but when I want open that with iphone 13 , always WebApp.initDataUnsafe.start_param is undefined, my project on react.js
and "@twa-dev/sdk": "^7.0.0", help me to fix that
I check TelegramMessenger/Telegram-iOS#1091
but still have problem

I have solved this problem!!! /newapp in the bot wrote and filled in all the data!

t.me/My_bot - was t.me/My_bot/appname - became

i also have same problem my link is like https://t.me/masterversess_bot?startapp=${referralId}` this and i am not getting the start_param in initdata why canyou please help me what will i do . do i need to update the url

@ami-in
Copy link

ami-in commented Oct 7, 2024

Still getting this error on Telegram for Android v11.1.3 (5243)

When opening miniapp using t.me/bot_name?startapp=testParameter - start_param is available on Windows Desktop, but unavailable on MacOS Desktop, iOS and Android

Default webapp t.me/bot_name/webapp_name?startapp=testParameter works fine

how to get the webapp_name where i get this and i am created an mini app
t.me/testmasterversepray_bot/testmaster?startapp=7472847113
the botname is that mini app name is testmaster but it showing the bot not found please help

@ami-in
Copy link

ami-in commented Oct 7, 2024

for anyone having problem like this, try talk to BotFather and setup a webapp for your bot. After finish, depends on your setting the link will be like t.me/bot_name/webapp_name then when you open t.me/bot_name/webapp_name?startapp=Rick your webapp will be able to get startapp params

This was it. I didn’t realize setting up a web app through BotFather was something I had to do. It worked fine on desktop, so I didn’t catch that it was necessary step for phones. Thank you.

Hi @bobpepers ,Can you tell me where webapp_name is set?

same issue for me
https://t.me/masterversess_bot/Masterverses?startapp=7472847113
i updated my link like this and it showing bot not found webapp_name is the bot name? can you please help if you get solution

@SurajG20
Copy link

for anyone having problem like this, try talk to BotFather and setup a webapp for your bot. After finish, depends on your setting the link will be like t.me/bot_name/webapp_name then when you open t.me/bot_name/webapp_name?startapp=Rick your webapp will be able to get startapp params

This was it. I didn’t realize setting up a web app through BotFather was something I had to do. It worked fine on desktop, so I didn’t catch that it was necessary step for phones. Thank you.

Hi @bobpepers ,Can you tell me where webapp_name is set?

same issue for me https://t.me/masterversess_bot/Masterverses?startapp=7472847113 i updated my link like this and it showing bot not found webapp_name is the bot name? can you please help if you get solution

Go to botfather, create /newapp and fill all the details. add weburl you will get complete link in myapps

@ami-in
Copy link

ami-in commented Oct 24, 2024

for anyone having problem like this, try talk to BotFather and setup a webapp for your bot. After finish, depends on your setting the link will be like t.me/bot_name/webapp_name then when you open t.me/bot_name/webapp_name?startapp=Rick your webapp will be able to get startapp params

This was it. I didn’t realize setting up a web app through BotFather was something I had to do. It worked fine on desktop, so I didn’t catch that it was necessary step for phones. Thank you.

Hi @bobpepers ,Can you tell me where webapp_name is set?

same issue for me https://t.me/masterversess_bot/Masterverses?startapp=7472847113 i updated my link like this and it showing bot not found webapp_name is the bot name? can you please help if you get solution

Go to botfather, create /newapp and fill all the details. add weburl you will get complete link in myapps

thank for it . my issue is resolved when i created and webapp for my miniapp <333

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

12 participants