Download the PHP package micromagicman/laravel-telegram-webapp without Composer

On this page you can find all versions of the php package micromagicman/laravel-telegram-webapp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-telegram-webapp

Laravel Telegram WebApp package

build codecov

Laravel package that allows you to process commands from Telegram MiniApp with user verification according to Telegram MiniApp developer documentation, as well as obtaining information about the Telegram user who sent the request

Requirements

Laravel micromagicman/laravel-telegram-webapp
10.x 1.x.x
11.x 2.x.x

Install

Via composer

Publishing

Publish to your Laravel application:

Configure

All package configuration available in config/telegram-webapp.php file after publish command execution:

Config name Description Environment Default value
enabled Telegram MiniApp data validation switch TELEGRAM_WEBAPP_DATA_VALIDATION_ENABLED true
webAppScriptLocation Path to script (.js) which initializes Telegram MiniApp on your frontend app - https://telegram.org/js/telegram-web-app.js
botToken Your Telegram bot token TELEGRAM_BOT_TOKEN -
error.status HTTP status code when Telegram MiniApp data validation fails - 403 (Forbidden)
error.message Error message returned when Telegram MiniApp data validation fails - 403 (Forbidden)
authDateLifetimeSeconds The lifetime of the Telegram initData auth_date parameter in seconds. The request to the server must be made within this interval, otherwise the data transmitted from Telegram will be considered invalid. The values of the parameter <= 0 imply that there is no verification of the lifetime of data from telegram and the auth_date parameter is not validated - 0

Example in code:

View

This package provides a root view for Telegram MiniApp frontend applications. Telegram WebApp script is automatically includes to this view or its inheritors if telegram-webapp.enabled switch is true

Example:

Telegram bot API

answerWebAppQuery

Set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, an Illuminate\Http\Client\Response object is returned.

Parameters

$result - one of InlineQueryResult variations (php array)


All versions of laravel-telegram-webapp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
illuminate/support Version ^11.0
illuminate/routing Version ^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package micromagicman/laravel-telegram-webapp contains the following files

Loading the files please wait ....