diff --git a/data/web/corefork.telegram.org/api/auth.html b/data/web/corefork.telegram.org/api/auth.html index 54c0e5a1cb..f803180dd9 100644 --- a/data/web/corefork.telegram.org/api/auth.html +++ b/data/web/corefork.telegram.org/api/auth.html @@ -216,7 +216,7 @@ In this case, instructions for SRP 2FA authentication mus

To set up two-factor authorization on an already authorized account, follow the SRP 2FA authentication docs.

Test Accounts

Each phone number is limited to only a certain amount of logins per day (e.g. 5, but this is subject to change) after which the API will return a FLOOD error until the next day. This might not be enough for testing the implementation of User Authorization flows in client applications.

-

There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on Test DCs (their IP addresses for TCP transport are available in API development tools panel after api_id was obtained, URI format for HTTPS/Websocket transport).

+

There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on Test DCs (their IP addresses for TCP transport are available in API development tools panel after api_id was obtained, URI format for HTTPS/WebSocket transport).

If you wish to emulate an application of a user associated with DC number X, it is sufficient to specify the phone number as 99966XYYYY, where YYYY are random numbers, when registering the user. A user like this would always get XXXXX as the login confirmation code (the DC number, repeated five times). Note that the value of X must be in the range of 1-3 because there are only 3 Test DCs. When the flood limit is reached for any particular test number, just choose another number (changing the YYYY random part).

Do not store any important or private information in the messages of such test accounts; anyone can make use of the simplified authorization mechanism – and we periodically wipe all information stored there.

Proceed with User Authorization flows in Production DCs only after you make sure everything works correctly on Test DCs first to avoid reaching flood limits.

diff --git a/data/web/corefork.telegram.org/bots/samples.html b/data/web/corefork.telegram.org/bots/samples.html index b6d17be02b..02a1fe0b20 100644 --- a/data/web/corefork.telegram.org/bots/samples.html +++ b/data/web/corefork.telegram.org/bots/samples.html @@ -47,212 +47,377 @@

This page lists some libraries and frameworks developed by the Telegram community – you should take care to report any bugs you may find to the respective developers, as these projects are not maintained by Telegram.

Ping us on @BotSupport if you would like your library to appear on this page.

-

PHP

+

PHP

-

Go

+

Go

-

Python

+

Python

-

Rust

+

Rust

-

Kotlin

+

Kotlin

-

Node.js

+

Node.js

-

.NET

+

.NET

-

Swift

+

Swift

-

TypeScript

+

TypeScript

-

Java

+

Java

-

Scala

+

Scala

-

Ruby

+

Ruby

-

Other Languages

+

Other Languages

- + diff --git a/data/web/corefork.telegram.org/bots/webhooks.html b/data/web/corefork.telegram.org/bots/webhooks.html index d24e9a6dc4..c5fe6b9d5e 100644 --- a/data/web/corefork.telegram.org/bots/webhooks.html +++ b/data/web/corefork.telegram.org/bots/webhooks.html @@ -52,8 +52,8 @@

Other advantages may include saving some potential CPU cycles and an increase in response time, these things however depend heavily on the usage pattern of your bot.

Setting a webhook means you supplying Telegram with a location in the form of a URL, on which your bot listens for updates. We need to be able to connect and post updates to that URL.

To ensure that we can do that, there are some basic requirements:

-

The short version

-

You'll need a server that:

+

The short version

+

You'll need a server that:

-

That’s almost all there’s to it.
If you decide to limit traffic to our specific range of addresses, keep an eye on this document whenever you seem to run into trouble. Our IP-range might change in the future.

-

The longer version

+

That’s almost all there’s to it. +If you decide to limit traffic to our specific range of addresses, keep an eye on this document whenever you seem to run into trouble. Our IP-range might change in the future.

+

The longer version

-

The verbose version

-
How do I get a server with a domain name?
+

The verbose version

+
How do I get a server with a domain name?

If you use a webhook, we have to deliver requests to your bot to a server we can reach. So yes, you need a server we can connect to. It can be anywhere in the galaxy, if you ensure we can reach the server by domain name (or at least via IP for a self-signed certificate), it will work just fine.

-

There are quite a few ways to get this done, as a novice however it's likely that you're not directly jumping at the chance of crafting this from scratch. Actually, as a novice, we recommend you don't. It's likely to be a complex and long ride.

+

There are quite a few ways to get this done, as a novice however it's likely that you're not directly jumping at the chance of crafting this from scratch. Actually, as a novice, we recommend you don't. It's likely to be a complex and long ride.

If you got stuck here, make a choice:

-
If you're going with a hosted service, make sure to look for a hosting provider that 
+
If you're going with a hosted service, make sure to look for a hosting provider that 
 not only supports your code’s needs, for example: support for your PHP version,
 but one that also handles SSL and allows you to create/deploy certificates.
-
How do I check for open ports or limit access to my bot?
+
How do I check for open ports or limit access to my bot?

So you have the hosting thing down and all is good so far, however, when you enter the address of your bot in your browser it seems unreachable.

-

Explaining every firewall or web server solution in detail isn't possible for us, which we hope you understand. If you’re running a hosted solution, you’re more likely to have a nice UI where you configure these settings. Head to your configuration panel and check all of them. If you’re on a Linux based VPS with shell access, we have some tips for you:

+

Explaining every firewall or web server solution in detail isn't possible for us, which we hope you understand. If you’re running a hosted solution, you’re more likely to have a nice UI where you configure these settings. Head to your configuration panel and check all of them. If you’re on a Linux based VPS with shell access, we have some tips for you:

- -
If you use iptables, make sure to actually SAVE after changing the configuration.
 On a Debian based system the iptables-persistent package is be a good option.
 RHEL/CentOS offers a service iptables save -command.
-A quick online search for "YOUROPERATINGSYSTEM save iptables" also helps.
+A quick online search for "YOUROPERATINGSYSTEM save iptables" also helps.

That’s all for our examples. More information on best practices for setting up your firewall, on whichever operating system you prefer for your bot, is best found on the internet.

-
SSL/TLS, what is it and why do I have to handle this for a webhook?
-

You’re already familiar with it in some form or another. Whenever you see that (nicely green) lock in your browser bar, you know it’s reasonably safe to assume that you’ve landed on the site you actually wanted to visit. If you see the green lock, that's SSL/TLS in action. If you want to learn more about how SSL/TLS works in general, it's best to search the internet.

-

The main difference between getUpdates and a webhook is the way the connection takes place. getUpdates means you'll connect to our server, a webhook means we'll be connecting to your server instead. Connecting to your server has to be done secure, we have to know for sure it's you we're talking to after all. This means you'll have to handle all that server side encryption stuff, virtually presenting us with a green lock. If you use a web server for us to post to, you need to support SSL/TLS handling on the port/virtual host of your choice. An online search for “YOURWEBSERVER enable HTTPS” will help you.

+
SSL/TLS, what is it and why do I have to handle this for a webhook?
+

You’re already familiar with it in some form or another. Whenever you see that (nicely green) lock in your browser bar, you know it’s reasonably safe to assume that you’ve landed on the site you actually wanted to visit. If you see the green lock, that's SSL/TLS in action. If you want to learn more about how SSL/TLS works in general, it's best to search the internet.

+

The main difference between getUpdates and a webhook is the way the connection takes place. getUpdates means you'll connect to our server, a webhook means we'll be connecting to your server instead. Connecting to your server has to be done secure, we have to know for sure it's you we're talking to after all. This means you'll have to handle all that server side encryption stuff, virtually presenting us with a green lock. If you use a web server for us to post to, you need to support SSL/TLS handling on the port/virtual host of your choice. An online search for "YOURWEBSERVER enable HTTPS" will help you.

Not using a regular web server? Have a look at our example page, most examples there include code for handling SSL/TLS in a webhook setup.

-
How do I check that I’m handling the right version?
+
How do I check that I’m handling the right version?

You just read up on the whole SSL/TLS stuff, figured out that it’s not all that bad to setup and we add some more requirements. Here are some tips to check if you’re indeed supporting at least TLS1.2.

-
A certificate, where do I get one and how?
+
A certificate, where do I get one and how?

You need a certificate, pick on of these types;

@@ -208,7 +283,7 @@ You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank -For some fields there will be a default value,If you enter '.', +For some fields there will be a default value,If you enter '.', the field will be left blank.----- Country Name (2 letter code) [AU]: State or Province Name (full name) [Some-State]: @@ -217,30 +292,32 @@ Organization Name (eg, company) [Internet Widgits Pty Ltd]: Organizational Unit Name (eg, section) []: Common Name (e.g. server FQDN or YOUR name) []: yourbotdomainname Email Address []: -Please enter the following 'extra' attributes +Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: ---
---
-Enter keystore password:  
+Enter keystore password:  
 Re-enter new password: 
-What is your first and last name?  [Unknown]: yourbotdomainname
-What is the name of your organizational unit?  [Unknown]:  
-What is the name of your organization?  [Unknown]:  
-What is the name of your City or Locality?  [Unknown]:  
-What is the name of your State or Province?  [Unknown]:  
-What is the two-letter country code for this unit?  [Unknown]:  
-Is CN=test.telegram.org, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?  
-[no]:  yes
-Enter key password for yourbotdomainname   
+What is your first and last name?  [Unknown]: yourbotdomainname
+What is the name of your organizational unit?  [Unknown]:  
+What is the name of your organization?  [Unknown]:  
+What is the name of your City or Locality?  [Unknown]:  
+What is the name of your State or Province?  [Unknown]:  
+What is the two-letter country code for this unit?  [Unknown]:  
+Is CN=test.telegram.org, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?  
+[no]:  yes
+Enter key password for yourbotdomainname   
 (RETURN if same as keystore password): 
 ---

This generates the initial keystore, from which you can then create a CSR like this:

@@ -248,65 +325,83 @@ Enter key password for yourbotdomainname
---
 Enter keystore password:
 ---
-

To validate your certificate the Common Name (CN) has to match your webhook domain. Example, if you’re using https://www.example.com/example.php as a webhook address, the certificate CN has to be www.example.com.
So you need an exact match of the FQDN you’re setting for the webhook

+

To validate your certificate the Common Name (CN) has to match your webhook domain. Example, if you’re using https://www.example.com/example.php as a webhook address, the certificate CN has to be www.example.com. +So you need an exact match of the FQDN you’re setting for the webhook

There is an exception, if you’re using a SAN (Subject Alternative Name) the webhook address can either match the CN of your certificate, OR one of the SANs provided in the certificate. In most cases you’ll be using the CN.

Create your CSR and supply the contents of the file to your CA. Most CA’s are kind enough to give you an example command of the input format they expect.

-

cat yoursigningrequest.csr or cat yourbotdomainname.csr
Lets you have a look at the CSR we just generated:

+

cat yoursigningrequest.csr or cat yourbotdomainname.csr +Lets you have a look at the CSR we just generated:

- +
-

That doesn’t seem to informative, but we can deduce that the file is in PEM format (ASCII base64 encoded) and contains a certificate signing request. Luckily it is possible to look at the human readable contents of the CSR. Use the following commands to double check if all fields are set correctly.

Verify your CSR and supply it to your CA to get a certificate. We’ll use StartSSL as an example here. StartSSL allows you to set up to 5 names (SAN), Their intermediate certificate is also needed for a webhook to work, which makes for a nice complete example.

Go to the certificates wizard, enter the required hostname(s) for your SSL certificate (this is the CN you’ve also set in the CSR and an optional SAN).

- +
- -

In the example above we’ve chosen to set a CN (test.telegram.org), but also a SAN (sanexample.telegram.org) The CN given has to match the CN used for generating the CSR.
Set your CN (and optional SAN) and copy the contents of the yoursigningrequest.csr file.

+

In the example above we’ve chosen to set a CN (test.telegram.org), but also a SAN (sanexample.telegram.org) The CN given has to match the CN used for generating the CSR. +Set your CN (and optional SAN) and copy the contents of the yoursigningrequest.csr file.

- +
-

Paste the contents, submit and you’re done.

- +
- -

Now you can download the created certificate directly. In the example used above you’ll receive a zip file with several PEM certificates. The root, intermediate and yourdomain certificate.
You need the intermediate and yourdomain to set a webhook with a StartSSL certificate.

+

Now you can download the created certificate directly. In the example used above you’ll receive a zip file with several PEM certificates. The root, intermediate and yourdomain certificate. +You need the intermediate and yourdomain to set a webhook with a StartSSL certificate.

You can inspect the set of certificates you’ve just downloaded.

- +
-

With your fresh certificates at hand, you can now continue setting your webhook.

-

A self-signed certificate is generated and installed, to use the certificate for a self-signed webhook you'll have to export it in PEM format.

+

A self-signed certificate is generated and installed, to use the certificate for a self-signed webhook you'll have to export it in PEM format.

-

After following the above you'll end up with a nice self-signed certificate. You’ll still have to set the webhook, and handle SSL correctly.

-
How do I set a webhook for either type?
+

After following the above you'll end up with a nice self-signed certificate. You’ll still have to set the webhook, and handle SSL correctly.

+
How do I set a webhook for either type?

The setWebhook method is needed for both types. For a verified certificate with a trusted root CA, it’s enough to use the setWebhook method with just the URL parameter.

For a self-signed certificate an extra parameter is needed, certificate, with the public certificate in PEM format as data.

The -F means we’re using the multipart/form-data-type to supply the certificate, the type of the certificate parameter is inputFile. Make sure that you’re supplying the correct type.

Both parameters for the setWebhook method are classed as optional. Calling the method with an empty URL parameter can be used to clear a previously set webhook.

Keep in mind that the URL parameter starts with https:// when setting a webhook. By default that means we’re knocking at your door on port 443. If you want to use another port (80,88 or 8443), you’ll have to specify the port in the URL parameter.

-
Setting a verified webhook with an untrusted root
-

If you already have a verified certificate and our servers don’t trust your root CA, we have an alternative way for you to set a webhook. Instead of using the setWebhook method without the certificate parameter, you can use the self-signed method. Your CA's root certificate has to be used as an inputFile for the certificate parameter.

+
Setting a verified webhook with an untrusted root
+

If you already have a verified certificate and our servers don’t trust your root CA, we have an alternative way for you to set a webhook. Instead of using the setWebhook method without the certificate parameter, you can use the self-signed method. Your CA's root certificate has to be used as an inputFile for the certificate parameter.

You can use these commands to quickly convert a DER formatted root certificate to PEM:

Once done, set your webhook with the root-pem-file and you’ll be good to go. If you need more pointers, have a look at the self-signed part of this guide.

-
Supplying an intermediate certificate
+
Supplying an intermediate certificate

Once you’ve crafted your certificate, your CA might present you with a nice bundle. Most bundles contain a root certificate, your public certificate and sometimes an intermediate certificate. StartSSL is one of many CA’s that’ll supply such an intermediate beast. This certificate has to be supplied in the chain of certificates you’re presenting to us when we connect to your server. If an intermediate was used to sign your certificate but isn’t supplied to our servers, we won’t be able to verify the chain of trust and your webhook will not work.

If your webhook isn’t working and you’re wondering if the chain is complete:

Here’s an example of a complete chain, note that in this case 2 intermediate certificates have been supplied.

- +
-

Even though your browser might not complain when visiting your page, an incomplete chain will not work for your webhook. If your chain is incomplete we have some tips to add them to your current setup:

-

The end result of all this is a complete certificate chain, backed by either a root certificate we trust or, in the case of an untrusted root, a root certificate you're supplying to us. Make sure to verify your setup again after adding the intermediate, once done, you're good to go!

-
Testing your bot with updates
+

The end result of all this is a complete certificate chain, backed by either a root certificate we trust or, in the case of an untrusted root, a root certificate you're supplying to us. Make sure to verify your setup again after adding the intermediate, once done, you're good to go!

+
Testing your bot with updates
- + diff --git a/data/web/corefork.telegram.org/constructor/messageEntityMention.html b/data/web/corefork.telegram.org/constructor/messageEntityMention.html index 502f716ba2..fc2bc24c9a 100644 --- a/data/web/corefork.telegram.org/constructor/messageEntityMention.html +++ b/data/web/corefork.telegram.org/constructor/messageEntityMention.html @@ -4,10 +4,10 @@ messageEntityMention - + - + @@ -84,7 +84,9 @@

Styled text with message entities

How to create styled text with message entities

Mentions

-

Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.

+

Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.

+

messageEntityMentionName

+

Message entity representing a user mention: for creating a mention use inputMessageEntityMentionName.

diff --git a/data/web/corefork.telegram.org/method/auth.sendCode b/data/web/corefork.telegram.org/method/auth.sendCode index a8b061697e..397eaab40f 100644 --- a/data/web/corefork.telegram.org/method/auth.sendCode +++ b/data/web/corefork.telegram.org/method/auth.sendCode @@ -153,6 +153,11 @@ SMS_CODE_CREATE_FAILED An error occurred while creating the SMS code. + +400 +Sorry, too many invalid attempts to enter your password. Please try again later. +  + diff --git a/data/web/corefork.telegram.org/method/channels.createChannel b/data/web/corefork.telegram.org/method/channels.createChannel index 8d12ace836..b42820d433 100644 --- a/data/web/corefork.telegram.org/method/channels.createChannel +++ b/data/web/corefork.telegram.org/method/channels.createChannel @@ -149,6 +149,11 @@ You have joined too many channels/supergroups. +500 +CHANNEL_ID_GENERATE_FAILED +  + + 400 CHAT_ABOUT_TOO_LONG Chat about too long. @@ -159,6 +164,11 @@ No chat title provided. +400 +TTL_PERIOD_INVALID +The specified TTL period is invalid. + + 406 USER_RESTRICTED You're spamreported, you can't create channels or chats. diff --git a/data/web/corefork.telegram.org/method/channels.createForumTopic b/data/web/corefork.telegram.org/method/channels.createForumTopic index e4c0b30cde..32788be8dd 100644 --- a/data/web/corefork.telegram.org/method/channels.createForumTopic +++ b/data/web/corefork.telegram.org/method/channels.createForumTopic @@ -128,6 +128,11 @@ CHANNEL_INVALID The provided channel is invalid. + +403 +CHAT_WRITE_FORBIDDEN +You can't write in this chat. +

Bots can use this method

diff --git a/data/web/corefork.telegram.org/method/channels.deleteChannel b/data/web/corefork.telegram.org/method/channels.deleteChannel index c6ffb495c1..ba34858f7d 100644 --- a/data/web/corefork.telegram.org/method/channels.deleteChannel +++ b/data/web/corefork.telegram.org/method/channels.deleteChannel @@ -116,7 +116,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 403 diff --git a/data/web/corefork.telegram.org/method/channels.deleteTopicHistory b/data/web/corefork.telegram.org/method/channels.deleteTopicHistory index a7d5a8b039..b91df532e0 100644 --- a/data/web/corefork.telegram.org/method/channels.deleteTopicHistory +++ b/data/web/corefork.telegram.org/method/channels.deleteTopicHistory @@ -82,6 +82,28 @@

Result

messages.AffectedHistory

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400TOPIC_ID_INVALIDThe specified topic ID is invalid.

Bots can use this method

Related pages

Forums

diff --git a/data/web/corefork.telegram.org/method/channels.editCreator b/data/web/corefork.telegram.org/method/channels.editCreator index 15338486ed..8c66c6613b 100644 --- a/data/web/corefork.telegram.org/method/channels.editCreator +++ b/data/web/corefork.telegram.org/method/channels.editCreator @@ -119,6 +119,11 @@ You must be an admin in this chat to do this. +400 +CHAT_NOT_MODIFIED +No changes were made to chat information because the new information you passed is identical to the current information. + + 403 CHAT_WRITE_FORBIDDEN You can't write in this chat. diff --git a/data/web/corefork.telegram.org/method/channels.editLocation b/data/web/corefork.telegram.org/method/channels.editLocation index b6e9751535..b2e57e4c18 100644 --- a/data/web/corefork.telegram.org/method/channels.editLocation +++ b/data/web/corefork.telegram.org/method/channels.editLocation @@ -106,7 +106,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/channels.editPhoto b/data/web/corefork.telegram.org/method/channels.editPhoto index edb68e950e..406b418365 100644 --- a/data/web/corefork.telegram.org/method/channels.editPhoto +++ b/data/web/corefork.telegram.org/method/channels.editPhoto @@ -116,7 +116,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 403 @@ -148,6 +148,11 @@ PHOTO_INVALID Photo invalid. + +400 +STICKER_MIME_INVALID +The specified sticker MIME type is invalid. +

Bots can use this method

diff --git a/data/web/corefork.telegram.org/method/channels.editTitle b/data/web/corefork.telegram.org/method/channels.editTitle index 9eb43430cf..cfbc01aed6 100644 --- a/data/web/corefork.telegram.org/method/channels.editTitle +++ b/data/web/corefork.telegram.org/method/channels.editTitle @@ -116,7 +116,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/channels.getForumTopics b/data/web/corefork.telegram.org/method/channels.getForumTopics index 39a71a9adb..67ad099fd7 100644 --- a/data/web/corefork.telegram.org/method/channels.getForumTopics +++ b/data/web/corefork.telegram.org/method/channels.getForumTopics @@ -129,7 +129,6 @@ -

Bots can use this method

Related pages

Pagination in the API

How to fetch results from large lists of objects.

diff --git a/data/web/corefork.telegram.org/method/channels.getForumTopicsByID b/data/web/corefork.telegram.org/method/channels.getForumTopicsByID index 1524f65c81..42b3dec8b1 100644 --- a/data/web/corefork.telegram.org/method/channels.getForumTopicsByID +++ b/data/web/corefork.telegram.org/method/channels.getForumTopicsByID @@ -82,6 +82,33 @@

Result

messages.ForumTopics

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400CHANNEL_FORUM_MISSINGThis supergroup is not a forum.
400CHANNEL_INVALIDThe provided channel is invalid.
400TOPICS_EMPTY 

Bots can use this method

diff --git a/data/web/corefork.telegram.org/method/channels.getFullChannel b/data/web/corefork.telegram.org/method/channels.getFullChannel index 4f8a3830b6..3f68889a20 100644 --- a/data/web/corefork.telegram.org/method/channels.getFullChannel +++ b/data/web/corefork.telegram.org/method/channels.getFullChannel @@ -105,7 +105,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/channels.joinChannel b/data/web/corefork.telegram.org/method/channels.joinChannel index 60ca2144d4..be6e7f8a44 100644 --- a/data/web/corefork.telegram.org/method/channels.joinChannel +++ b/data/web/corefork.telegram.org/method/channels.joinChannel @@ -134,6 +134,11 @@ You have successfully requested to join this chat or channel. +500 +MEMBER_CHAT_ADD_FAILED +  + + 400 MSG_ID_INVALID Invalid message ID provided. diff --git a/data/web/corefork.telegram.org/method/channels.toggleJoinRequest b/data/web/corefork.telegram.org/method/channels.toggleJoinRequest index 0e2c2d3c33..ec102d4046 100644 --- a/data/web/corefork.telegram.org/method/channels.toggleJoinRequest +++ b/data/web/corefork.telegram.org/method/channels.toggleJoinRequest @@ -111,7 +111,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/channels.togglePreHistoryHidden b/data/web/corefork.telegram.org/method/channels.togglePreHistoryHidden index 4940391147..8cdbfd7cbf 100644 --- a/data/web/corefork.telegram.org/method/channels.togglePreHistoryHidden +++ b/data/web/corefork.telegram.org/method/channels.togglePreHistoryHidden @@ -126,7 +126,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. diff --git a/data/web/corefork.telegram.org/method/channels.toggleSignatures b/data/web/corefork.telegram.org/method/channels.toggleSignatures index 3bad77bfb1..7c77b42980 100644 --- a/data/web/corefork.telegram.org/method/channels.toggleSignatures +++ b/data/web/corefork.telegram.org/method/channels.toggleSignatures @@ -116,7 +116,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. diff --git a/data/web/corefork.telegram.org/method/channels.toggleSlowMode b/data/web/corefork.telegram.org/method/channels.toggleSlowMode index 241ffec7a5..3e52284693 100644 --- a/data/web/corefork.telegram.org/method/channels.toggleSlowMode +++ b/data/web/corefork.telegram.org/method/channels.toggleSlowMode @@ -111,7 +111,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/channels.toggleUsername b/data/web/corefork.telegram.org/method/channels.toggleUsername index 2c63cc1fa9..2459ae257c 100644 --- a/data/web/corefork.telegram.org/method/channels.toggleUsername +++ b/data/web/corefork.telegram.org/method/channels.toggleUsername @@ -100,6 +100,16 @@ 400 +CHANNEL_PRIVATE +You haven't joined this channel/supergroup. + + +400 +CHAT_ADMIN_REQUIRED +You must be an admin in this chat to do this. + + +400 USERNAMES_ACTIVE_TOO_MUCH The maximum number of active usernames was reached. diff --git a/data/web/corefork.telegram.org/method/channels.updateUsername b/data/web/corefork.telegram.org/method/channels.updateUsername index af27ccae8b..e4a1bcbf09 100644 --- a/data/web/corefork.telegram.org/method/channels.updateUsername +++ b/data/web/corefork.telegram.org/method/channels.updateUsername @@ -116,7 +116,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 403 diff --git a/data/web/corefork.telegram.org/method/channels.viewSponsoredMessage b/data/web/corefork.telegram.org/method/channels.viewSponsoredMessage index 3abdfd0ee5..6b684d0fd6 100644 --- a/data/web/corefork.telegram.org/method/channels.viewSponsoredMessage +++ b/data/web/corefork.telegram.org/method/channels.viewSponsoredMessage @@ -98,6 +98,11 @@ CHANNEL_INVALID The provided channel is invalid. + +400 +CHANNEL_PRIVATE +You haven't joined this channel/supergroup. +

Errors

diff --git a/data/web/corefork.telegram.org/method/chatlists.getChatlistUpdates b/data/web/corefork.telegram.org/method/chatlists.getChatlistUpdates index bfed710f23..a61c354c05 100644 --- a/data/web/corefork.telegram.org/method/chatlists.getChatlistUpdates +++ b/data/web/corefork.telegram.org/method/chatlists.getChatlistUpdates @@ -77,6 +77,23 @@

Result

chatlists.ChatlistUpdates

+

Possible errors

+ + + + + + + + + + + + + + + +
CodeTypeDescription
400INPUT_CHATLIST_INVALID 

Bots can use this method

Related pages

Deep links

diff --git a/data/web/corefork.telegram.org/method/folders.editPeerFolders b/data/web/corefork.telegram.org/method/folders.editPeerFolders index 6e76d87dba..5ab23c3cbd 100644 --- a/data/web/corefork.telegram.org/method/folders.editPeerFolders +++ b/data/web/corefork.telegram.org/method/folders.editPeerFolders @@ -95,6 +95,11 @@ 400 +CHANNEL_PRIVATE +You haven't joined this channel/supergroup. + + +400 CHAT_ID_INVALID The provided chat id is invalid. diff --git a/data/web/corefork.telegram.org/method/messages.checkChatInvite b/data/web/corefork.telegram.org/method/messages.checkChatInvite index 549dda83cc..ee483a878d 100644 --- a/data/web/corefork.telegram.org/method/messages.checkChatInvite +++ b/data/web/corefork.telegram.org/method/messages.checkChatInvite @@ -95,6 +95,11 @@ You haven't joined this channel/supergroup. +500 +CHAT_MEMBERS_CHANNEL +  + + 400 INVITE_HASH_EMPTY The invite hash is empty. diff --git a/data/web/corefork.telegram.org/method/messages.editChatAbout b/data/web/corefork.telegram.org/method/messages.editChatAbout index 9a9f29ef28..ac876b0eb0 100644 --- a/data/web/corefork.telegram.org/method/messages.editChatAbout +++ b/data/web/corefork.telegram.org/method/messages.editChatAbout @@ -126,7 +126,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 403 diff --git a/data/web/corefork.telegram.org/method/messages.editChatDefaultBannedRights b/data/web/corefork.telegram.org/method/messages.editChatDefaultBannedRights index db6103c9be..b6c3d4cb1a 100644 --- a/data/web/corefork.telegram.org/method/messages.editChatDefaultBannedRights +++ b/data/web/corefork.telegram.org/method/messages.editChatDefaultBannedRights @@ -110,8 +110,13 @@ 400 +CHAT_ID_INVALID +The provided chat id is invalid. + + +400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 403 diff --git a/data/web/corefork.telegram.org/method/messages.editChatPhoto b/data/web/corefork.telegram.org/method/messages.editChatPhoto index 332662245e..4714377035 100644 --- a/data/web/corefork.telegram.org/method/messages.editChatPhoto +++ b/data/web/corefork.telegram.org/method/messages.editChatPhoto @@ -106,7 +106,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/messages.editChatTitle b/data/web/corefork.telegram.org/method/messages.editChatTitle index 5c9da8e1b6..6627f17f20 100644 --- a/data/web/corefork.telegram.org/method/messages.editChatTitle +++ b/data/web/corefork.telegram.org/method/messages.editChatTitle @@ -106,7 +106,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/messages.editExportedChatInvite b/data/web/corefork.telegram.org/method/messages.editExportedChatInvite index aec121f414..7d45a3952c 100644 --- a/data/web/corefork.telegram.org/method/messages.editExportedChatInvite +++ b/data/web/corefork.telegram.org/method/messages.editExportedChatInvite @@ -125,6 +125,11 @@ 400 +CHANNEL_PRIVATE +You haven't joined this channel/supergroup. + + +400 CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this. diff --git a/data/web/corefork.telegram.org/method/messages.editMessage b/data/web/corefork.telegram.org/method/messages.editMessage index 271ec93169..335e86131d 100644 --- a/data/web/corefork.telegram.org/method/messages.editMessage +++ b/data/web/corefork.telegram.org/method/messages.editMessage @@ -204,6 +204,11 @@ A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length. +400 +IMAGE_PROCESS_FAILED +Failure while processing image. + + 403 INLINE_BOT_REQUIRED Only the inline bot can edit message. @@ -239,6 +244,11 @@ Previous media invalid. +400 +MEDIA_TTL_INVALID +The specified media TTL is invalid. + + 403 MESSAGE_AUTHOR_REQUIRED Message author required. diff --git a/data/web/corefork.telegram.org/method/messages.forwardMessages b/data/web/corefork.telegram.org/method/messages.forwardMessages index 1fd30defcd..f3736d66e9 100644 --- a/data/web/corefork.telegram.org/method/messages.forwardMessages +++ b/data/web/corefork.telegram.org/method/messages.forwardMessages @@ -184,6 +184,11 @@ You can't forward messages from a protected chat. +403 +CHAT_GUEST_SEND_FORBIDDEN +You join the discussion group before commenting, see here » for more info. + + 400 CHAT_ID_INVALID The provided chat id is invalid. @@ -358,7 +363,9 @@

Bots can use this method

Related pages

Forums

-

Telegram allows creating forums with multiple distinct topics.

+

Telegram allows creating forums with multiple distinct topics.

+

Discussion groups

+

Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.

diff --git a/data/web/corefork.telegram.org/method/messages.getBotApp b/data/web/corefork.telegram.org/method/messages.getBotApp index e10c036040..f1d2c7ce33 100644 --- a/data/web/corefork.telegram.org/method/messages.getBotApp +++ b/data/web/corefork.telegram.org/method/messages.getBotApp @@ -99,7 +99,6 @@ -

Bots can use this method

Related pages

Deep links

Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.

diff --git a/data/web/corefork.telegram.org/method/messages.getChatInviteImporters b/data/web/corefork.telegram.org/method/messages.getChatInviteImporters index 4833f13b8a..d2e7a182e1 100644 --- a/data/web/corefork.telegram.org/method/messages.getChatInviteImporters +++ b/data/web/corefork.telegram.org/method/messages.getChatInviteImporters @@ -124,6 +124,11 @@ 400 +CHANNEL_INVALID +The provided channel is invalid. + + +400 CHANNEL_PRIVATE You haven't joined this channel/supergroup. diff --git a/data/web/corefork.telegram.org/method/messages.getReplies b/data/web/corefork.telegram.org/method/messages.getReplies index eb9e739c23..199f7728d0 100644 --- a/data/web/corefork.telegram.org/method/messages.getReplies +++ b/data/web/corefork.telegram.org/method/messages.getReplies @@ -150,6 +150,11 @@ PEER_ID_INVALID The provided peer id is invalid. + +400 +TOPIC_ID_INVALID +The specified topic ID is invalid. +

Related pages

diff --git a/data/web/corefork.telegram.org/method/messages.hideAllChatJoinRequests b/data/web/corefork.telegram.org/method/messages.hideAllChatJoinRequests index b7c59a4e4e..125a7b11a7 100644 --- a/data/web/corefork.telegram.org/method/messages.hideAllChatJoinRequests +++ b/data/web/corefork.telegram.org/method/messages.hideAllChatJoinRequests @@ -110,6 +110,11 @@ 400 +CHANNELS_TOO_MUCH +You have joined too many channels/supergroups. + + +400 CHANNEL_PRIVATE You haven't joined this channel/supergroup. diff --git a/data/web/corefork.telegram.org/method/messages.hideChatJoinRequest b/data/web/corefork.telegram.org/method/messages.hideChatJoinRequest index 91cd579c44..126ff3581e 100644 --- a/data/web/corefork.telegram.org/method/messages.hideChatJoinRequest +++ b/data/web/corefork.telegram.org/method/messages.hideChatJoinRequest @@ -110,10 +110,25 @@ 400 +CHANNELS_TOO_MUCH +You have joined too many channels/supergroups. + + +400 +CHANNEL_PRIVATE +You haven't joined this channel/supergroup. + + +400 CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this. +403 +CHAT_WRITE_FORBIDDEN +You can't write in this chat. + + 400 HIDE_REQUESTER_MISSING The join request was missing or was already handled. @@ -125,6 +140,11 @@ 400 +MSG_ID_INVALID +Invalid message ID provided. + + +400 PEER_ID_INVALID The provided peer id is invalid. diff --git a/data/web/corefork.telegram.org/method/messages.receivedQueue b/data/web/corefork.telegram.org/method/messages.receivedQueue index b7cf8f31f9..90f75ddcfa 100644 --- a/data/web/corefork.telegram.org/method/messages.receivedQueue +++ b/data/web/corefork.telegram.org/method/messages.receivedQueue @@ -93,7 +93,7 @@ The method returns a list of random_ids of messages for which p The specified max_qts is invalid. -400 +500 MSG_WAIT_FAILED A waiting call returned an error. diff --git a/data/web/corefork.telegram.org/method/messages.report b/data/web/corefork.telegram.org/method/messages.report index 7fb9252f0e..bac0cad46d 100644 --- a/data/web/corefork.telegram.org/method/messages.report +++ b/data/web/corefork.telegram.org/method/messages.report @@ -105,6 +105,11 @@ 400 +CHANNEL_INVALID +The provided channel is invalid. + + +400 CHANNEL_PRIVATE You haven't joined this channel/supergroup. diff --git a/data/web/corefork.telegram.org/method/messages.reportReaction b/data/web/corefork.telegram.org/method/messages.reportReaction index 91f6e09176..211e3d617a 100644 --- a/data/web/corefork.telegram.org/method/messages.reportReaction +++ b/data/web/corefork.telegram.org/method/messages.reportReaction @@ -88,6 +88,28 @@

Result

Bool

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400MSG_ID_INVALIDInvalid message ID provided.
400USER_ID_INVALIDThe provided user ID is invalid.

Related pages

Message reactions

Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.

diff --git a/data/web/corefork.telegram.org/method/messages.requestAppWebView b/data/web/corefork.telegram.org/method/messages.requestAppWebView index 56c032aaf1..f9a0834cb3 100644 --- a/data/web/corefork.telegram.org/method/messages.requestAppWebView +++ b/data/web/corefork.telegram.org/method/messages.requestAppWebView @@ -108,7 +108,6 @@

Result

AppWebViewResult

-

Bots can use this method

Related pages

Deep links

Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.

diff --git a/data/web/corefork.telegram.org/method/messages.sendEncryptedService b/data/web/corefork.telegram.org/method/messages.sendEncryptedService index 365fc5e6f0..f248a9a95c 100644 --- a/data/web/corefork.telegram.org/method/messages.sendEncryptedService +++ b/data/web/corefork.telegram.org/method/messages.sendEncryptedService @@ -114,7 +114,7 @@ The provided secret chat ID is invalid. -400 +500 MSG_WAIT_FAILED A waiting call returned an error. diff --git a/data/web/corefork.telegram.org/method/messages.sendMessage b/data/web/corefork.telegram.org/method/messages.sendMessage index 5a6bdb634d..80776307db 100644 --- a/data/web/corefork.telegram.org/method/messages.sendMessage +++ b/data/web/corefork.telegram.org/method/messages.sendMessage @@ -240,6 +240,11 @@ 400 +DOCUMENT_INVALID +The specified document is invalid. + + +400 ENCRYPTION_DECLINED The secret chat was declined. @@ -284,6 +289,11 @@ Invalid message ID provided. +500 +MSG_WAIT_FAILED +A waiting call returned an error. + + 406 PAYMENT_UNSUPPORTED A detailed description of the error will be received separately as described here ». diff --git a/data/web/corefork.telegram.org/method/messages.sendMultiMedia b/data/web/corefork.telegram.org/method/messages.sendMultiMedia index 0365e8bc93..3aabe74d10 100644 --- a/data/web/corefork.telegram.org/method/messages.sendMultiMedia +++ b/data/web/corefork.telegram.org/method/messages.sendMultiMedia @@ -170,6 +170,16 @@ 403 +CHAT_SEND_PHOTOS_FORBIDDEN +You can't send photos in this chat. + + +403 +CHAT_SEND_VIDEOS_FORBIDDEN +You can't send videos in this chat. + + +403 CHAT_WRITE_FORBIDDEN You can't write in this chat. diff --git a/data/web/corefork.telegram.org/method/messages.setChatAvailableReactions b/data/web/corefork.telegram.org/method/messages.setChatAvailableReactions index 340664dc2c..4ad554598e 100644 --- a/data/web/corefork.telegram.org/method/messages.setChatAvailableReactions +++ b/data/web/corefork.telegram.org/method/messages.setChatAvailableReactions @@ -106,7 +106,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/messages.setHistoryTTL b/data/web/corefork.telegram.org/method/messages.setHistoryTTL index f722aaeb46..568ff78cbb 100644 --- a/data/web/corefork.telegram.org/method/messages.setHistoryTTL +++ b/data/web/corefork.telegram.org/method/messages.setHistoryTTL @@ -101,7 +101,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/messages.toggleNoForwards b/data/web/corefork.telegram.org/method/messages.toggleNoForwards index c444b74e58..38a4a84989 100644 --- a/data/web/corefork.telegram.org/method/messages.toggleNoForwards +++ b/data/web/corefork.telegram.org/method/messages.toggleNoForwards @@ -101,7 +101,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/corefork.telegram.org/method/messages.unpinAllMessages b/data/web/corefork.telegram.org/method/messages.unpinAllMessages index 775791eedc..8c78af562b 100644 --- a/data/web/corefork.telegram.org/method/messages.unpinAllMessages +++ b/data/web/corefork.telegram.org/method/messages.unpinAllMessages @@ -105,7 +105,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. diff --git a/data/web/corefork.telegram.org/method/messages.updateDialogFilter b/data/web/corefork.telegram.org/method/messages.updateDialogFilter index 38c2b7ce91..dd0f7bda53 100644 --- a/data/web/corefork.telegram.org/method/messages.updateDialogFilter +++ b/data/web/corefork.telegram.org/method/messages.updateDialogFilter @@ -100,6 +100,11 @@ 400 +CHATLIST_EXCLUDE_INVALID +  + + +400 CHAT_ID_INVALID The provided chat id is invalid. diff --git a/data/web/corefork.telegram.org/method/messages.updatePinnedMessage b/data/web/corefork.telegram.org/method/messages.updatePinnedMessage index 5e7a0cc7a0..895d9e6f7f 100644 --- a/data/web/corefork.telegram.org/method/messages.updatePinnedMessage +++ b/data/web/corefork.telegram.org/method/messages.updatePinnedMessage @@ -136,7 +136,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 403 diff --git a/data/web/corefork.telegram.org/method/messages.uploadImportedMedia b/data/web/corefork.telegram.org/method/messages.uploadImportedMedia index c32aef3091..69e4de7546 100644 --- a/data/web/corefork.telegram.org/method/messages.uploadImportedMedia +++ b/data/web/corefork.telegram.org/method/messages.uploadImportedMedia @@ -104,6 +104,23 @@

Result

MessageMedia

+

Possible errors

+ + + + + + + + + + + + + + + +
CodeTypeDescription
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.

Related pages

Imported messages

Telegram allows importing messages and media from foreign chat apps.

diff --git a/data/web/corefork.telegram.org/method/messages.uploadMedia b/data/web/corefork.telegram.org/method/messages.uploadMedia index fc27f97511..477d173dd7 100644 --- a/data/web/corefork.telegram.org/method/messages.uploadMedia +++ b/data/web/corefork.telegram.org/method/messages.uploadMedia @@ -140,6 +140,11 @@ The number of file parts is invalid. +500 +FILE_WRITE_EMPTY +  + + 400 IMAGE_PROCESS_FAILED Failure while processing image. diff --git a/data/web/corefork.telegram.org/method/phone.getGroupCall b/data/web/corefork.telegram.org/method/phone.getGroupCall index 932a0ec2d4..23be710d66 100644 --- a/data/web/corefork.telegram.org/method/phone.getGroupCall +++ b/data/web/corefork.telegram.org/method/phone.getGroupCall @@ -93,6 +93,11 @@ +403 +GROUPCALL_FORBIDDEN +The group call has already ended. + + 400 GROUPCALL_INVALID The specified group call is invalid. diff --git a/data/web/corefork.telegram.org/method/photos.updateProfilePhoto b/data/web/corefork.telegram.org/method/photos.updateProfilePhoto index 690a2aaa45..0bd49639b3 100644 --- a/data/web/corefork.telegram.org/method/photos.updateProfilePhoto +++ b/data/web/corefork.telegram.org/method/photos.updateProfilePhoto @@ -113,6 +113,11 @@ The number of file parts is invalid. +500 +FILE_WRITE_EMPTY +  + + 400 IMAGE_PROCESS_FAILED Failure while processing image. diff --git a/data/web/corefork.telegram.org/method/users.getFullUser b/data/web/corefork.telegram.org/method/users.getFullUser index 1acafb0662..b7fdd5d0fd 100644 --- a/data/web/corefork.telegram.org/method/users.getFullUser +++ b/data/web/corefork.telegram.org/method/users.getFullUser @@ -99,6 +99,16 @@ 400 +USERNAME_OCCUPIED +The provided username is already occupied. + + +500 +USERNAME_UNSYNCHRONIZED +  + + +400 USER_ID_INVALID The provided user ID is invalid. diff --git a/data/web/corefork.telegram.org/mtproto.html b/data/web/corefork.telegram.org/mtproto.html index 2d774b8439..714f9b724a 100644 --- a/data/web/corefork.telegram.org/mtproto.html +++ b/data/web/corefork.telegram.org/mtproto.html @@ -111,7 +111,7 @@ MTProto v1.0 (described here for reference) is depreca

Brief Component Summary

High-Level Component (RPC Query Language/API)

-

From the standpoint of the high-level component, the client and the server exchange messages inside a session. The session is attached to the client device (the application, to be more exact) rather than a specific websocket/http/https/tcp connection. In addition, each session is attached to a user key ID by which authorization is actually accomplished.

+

From the standpoint of the high-level component, the client and the server exchange messages inside a session. The session is attached to the client device (the application, to be more exact) rather than a specific WebSocket/http/https/tcp connection. In addition, each session is attached to a user key ID by which authorization is actually accomplished.

Several connections to a server may be open; messages may be sent in either direction through any of the connections (a response to a query is not necessarily returned through the same connection that carried the original query, although most often, that is the case; however, in no case can a message be returned through a connection belonging to a different session). When the UDP protocol is used, a response might be returned by a different IP address than the one to which the query had been sent.

There are several types of messages: