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

RequestAppWebView add start params #776

Open
CodeVisionEvgen opened this issue Feb 22, 2025 · 2 comments
Open

RequestAppWebView add start params #776

CodeVisionEvgen opened this issue Feb 22, 2025 · 2 comments

Comments

@CodeVisionEvgen
Copy link

for (const row of rows) { for (const btn of row.buttons) { const res = await client.invoke( new Api.messages.RequestAppWebView({ peer: "WardyBot", platform: "web", writeAllowed: true, app: new Api.InputBotAppShortName({ // @ts-ignore botId: await client.getInputEntity( "https://t.me/WardyBot/app?startapp=" + btn.url.split("?startapp=")[1] ), shortName: "app", }), }) ); } }
how i can insert params to bot mini app link nodejs

@kpachbiu88
Copy link

kpachbiu88 commented Feb 23, 2025

  const result = await client.invoke(
    new Api.messages.RequestWebView({
      bot: "@wardybot",
      platform: "web",
      fromBotMenu: true,
      url: "https://wardbot.com",
      peer: "@wardybot",
      themeParams: new Api.DataJSON({
        data: '{"bg_color":"#ffffff","button_color":"#3390ec","button_text_color":"#ffffff","hint_color":"#707579","link_color":"#00488f","secondary_bg_color":"#f4f4f5","text_color":"#000000","header_bg_color":"#ffffff","accent_text_color":"#3390ec","section_bg_color":"#ffffff","section_header_text_color":"#3390ec","subtitle_text_color":"#707579","destructive_text_color":"#df3f40"}'
      })
    })
  )
// result will have full app URL with params

@CodeVisionEvgen
Copy link
Author

I need add startParam, but options startParam doesn't work

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

2 participants