telegram-api | Telegram Api library for java | REST library
kandi X-RAY | telegram-api Summary
kandi X-RAY | telegram-api Summary
Java Telegram Api Library.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Cancels a task
- Called when a task is completed
- Update file queue state
- Fetch a block from the upload task
- Fetch a upload task
- Fetches the next available block
- Fetch a download task
- Request a file to upload
- Returns the error message
- Cancel a task
- Gets the error tag
- Close this connection
- Waits for the task to complete
- Called when a block is uploaded
- Request a download task
- Switches to the primary dc
- Serialize the body
- Called when a download block is downloaded
- Returns the upload result for the given task id
telegram-api Key Features
telegram-api Examples and Code Snippets
Community Discussions
Trending Discussions on telegram-api
QUESTION
I'm currently following this tutorial. - Telegram Bot with Python Tutorial #3: Creating Bot and Webhook | Project
I have set-up a Flask server using the following python code:
...ANSWER
Answered 2019-Dec-20 at 01:36You need to have SSL enabled for this to work. Telegram is trying to initiate an SSL session with your server, but you don't have SSL enabled, so you are seeing the bad request.
ssl_context='adhoc'
may work for a test app, but I also have a hunch that telegram requires a VALID SSL certificate, not just an ad-hoc (or self-signed one). Notice the lock to the left of the URL in the video and the lack of a security warning that would be present with an invalid or self-signed certificate.
To make sure SSL is working set the ssl_context
to adhoc
, start the app, and browse to https://myprivatedomain.com:8443/index
. If you can browse to it, then Telegram will also be able to browse to it, after getting a valid certificate, of course.
Next, to get a valid (and free) SSL certificate you can use LetsEncrypt.
Once you have a valid SSL certificate and key file you can pass the ssl_context
argument to app.run
with a tuple of the path to the certificate file and the path to the key file ("/path/to/fullchain.pem", "/path/to/privkey.pem")
Your full run function should look like this
QUESTION
I'm writing a telegram bot group administrator using python-telegram-api and I want my bot to reply to messages in groups like this but the only similar thing I can get with it is this. Is there a way to reply to messages like in the first picture?
...ANSWER
Answered 2019-Dec-01 at 18:56You can use the reply_to_message_id
argument in the send_message
function:
QUESTION
ANSWER
Answered 2017-Jun-16 at 07:16What you need is Telegram's latest schema which you can always get from this link.
It is taken from the official Telegram Desktop repo on GitHub
The current Layer is 66
You can build your own converter to transform this file into a Telegram parser library in your preferred programming language.
Whenever the Layer changes, you simply re-run your converter and you have a TL-Parser for the latest version.
Also, you need to place the new and old TL schema side by side in a text editor that can show you the differences between the two schema (I use a file-difference plugin for Notepad++)
This difference shows you clearly what you need to change/include in your Telegram application to handle the changes in the new Layer.
EDIT
The new layer with voice calls is Layer 66: https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/Telegram/Resources/scheme.tl
QUESTION
I want to send pm messages via Telegram API not with Bot API, but when I want to read related documents about how to make a request I actually do not understand any thing. Can anyone guide me how to start using Telegram API?
...ANSWER
Answered 2017-Oct-13 at 14:46short answer: there's a jave lib you can use (https://github.com/rubenlagus/TelegramApi)
Steps are very clear and straightforward(https://core.telegram.org/api#getting-started):
1- Create yr application(register yrself for API usage): API Key, Hash, configuration API will be generated for you
2- learn how to call APIs if you dont know there's a great course at codecademy (https://www.codecademy.com/apis) you should know http concepts like get, post
3- authenticate yrself by auth_key_id and then using auth.sendCode method by passing auth_key_id, hash, phone_registered . steps are in https://core.telegram.org/api/auth
3- call telegram endpoints(https://core.telegram.org/methods). you can use some online tools to ease yr learning curve like https://www.hurl.it/
i have to admit since there's no code samples, it's not easy to use this API but steps are easy and it takes only some time.
hope it helps
QUESTION
I'm trying to store all messages which are exist in my telegram application. For example all my private chats and all group's messages and channel's messages I'm a member of them.
I use PHP programming language. And I need to get all messages as .json
(instead of seeing them into telegram application). Is doing that possible?
Based on some researched, I figured out it is possible by using Telegram API. But honestly it's vague for me. I don't know how should I start. Anyway, isn't there any implemented example of what I'm looking for? Or do you know how should I start?
...ANSWER
Answered 2017-Mar-12 at 18:42What you want to achieve is possible.
Let me give you a step by step walkthrough of how to do this. The directions below will work for any language of your choice.
It is easy to gain access to all messages that are directed to your Telegram account. You would first need to build a Telegram client. To get started on this check out these two SO Posts for the background you need (but not in PHP)
Successfully completing above step gets you Authorised on the Telegram Network, next step is to start listening for messages sent to your telegram account.
By this point you have the basic code setup to receive messages ALL types of telegram messages sent to your account. What you need now is to convert the received messages to JSON and possibly store them to any database of your choice. This step should be easy for you to do.
The steps 1 & 2 above do most of the heavy lifting for you by converting the bytes received from Telegram into a format that is accessible to you in your chosen programing language, you simply need to convert to JSON at this point.
Hope this helps.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install telegram-api
You can use telegram-api like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the telegram-api component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page