Skip to content

Instantly share code, notes, and snippets.

View Kasbr305's full-sized avatar
🌴
في عطلة

Kasbr Kasbr305

🌴
في عطلة
View GitHub Profile
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@90K2
90K2 / TelegramVerifier.kt
Created July 13, 2022 10:49
Kotlin implementation of telegram verification flow
@JsonIgnoreProperties(ignoreUnknown = true)
data class TelegramAuthRequestDTO(
@JsonProperty("auth_date")
val authDate: Long,
@JsonProperty("first_name")
val firstName: String?,
@JsonProperty("last_name")
val lastName: String?,