Code Monkey home page Code Monkey logo

telegram-webapps's Introduction

Telegram WebApps

Tools for telegram web apps: https://core.telegram.org/bots/webapps

Quick start:

Install Package: go get github.com/Fuchsoria/telegram-webapps

Add Imports:

import (
	"fmt"
	"log"
	webapps "github.com/Fuchsoria/telegram-webapps"
)

Use!:

func  main() {
	token  :=  "BOT_TOKEN"
	data  :=  "WebAppInitData_from_TG"

	err, user  := webapps.VerifyWebAppData(data, token)
	if err !=  nil {
		log.Fatal(err)
	}

	fmt.Println(user)
}

telegram-webapps's People

Contributors

fuchsoria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

merapat112

telegram-webapps's Issues

VerifyWebAppData doesnt work

initData:

query_id=AAEWiS4AAAAAABaJLgD4BBLT&user=%7B%22id%22%3A3049750%2C%22first_name%22%3A%22%D0%9C%D0%B0%D0%BA%D1%81%D0%B8%D0%BC%22%2C%22last_name%22%3A%22%D0%A1%D0%B0%D0%B4%D0%B0%D0%BA%D0%BE%D0%B2%20%E2%98%80%EF%B8%8F%22%2C%22username%22%3A%22sadakov%22%2C%22language_code%22%3A%22ru%22%7D&auth_date=1676624267&hash=88e1781fa4fb3a152a127a9265bd23179505b2072b82ea25132f24e27f4b76b2

hash 799eb92546f0d2fecaf1ab2d2f7e5d081b6fce4b456bc12d5de5a8f64fe9298b
WebAppHash 88e1781fa4fb3a152a127a9265bd23179505b2072b82ea25132f24e27f4b76b2

What could have gone wrong?

How to get webAppData for debug

first of all, thanks for your time

I have a question, how did you get your webAppData for debugging, without deploying webApp?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.