Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram API with PHP not bot [closed]

app using Ionic and have a PHP api backend for this app.

We need to integrate Telegram API messaging in this app, I need to use the API and not bot as we need to retrieve the users contacts to allow them to send new private message.

I have spent over 7 hours on looking for examples and Telegrams docs however still cant find a way to implement this, I wanted to know if anyone can point me in the right direction.

like image 871
Billy Mahmood Avatar asked Jan 08 '16 22:01

Billy Mahmood


People also ask

Does Telegram have an open API?

Telegram API This API allows you to build your own customized Telegram clients. It is 100% open for all developers who wish to create Telegram applications on our platform.

How can I send message from Telegram to PHP?

To send a message to the Telegram channel use the following PHP script example: <? php $apiToken = "5082654068:AAF7quCLZ4xuTq2FBdo3POssdJsM_FRHwTs"; $data = [ 'chat_id' => '515382482', 'text' => 'Hello from PHP! ' ]; $response = file_get_contents("https://api.telegram.org/bot$apiToken/sendMessage?" .

What is BotFather Telegram?

To create a chatbot on Telegram, you need to contact the BotFather, which is essentially a bot used to create other bots. The command you need is /newbot which leads to the following steps to create your bot: Your bot should have two attributes: a name and a username.

Why bot is not working in Telegram?

Suggestions: Ensure the Bot is in the group and as an admin. Try adding a new access token (revoke existing API key and create a new one then replace in plugin settings) If you edited the bot with @BotFather, make sure to restore it to the default settings.


1 Answers

PHP implementation of the telegram mtproto protocol.This project can run on PHP 7, PHP 5.6 and HHVM, only 64 bit systems are supported ATM.

https://github.com/danog/MadelineProto

or

https://daniil.it/MadelineProto

like image 163
javad shariaty Avatar answered Oct 06 '22 06:10

javad shariaty