mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-29 07:52:37 +01:00
Update content of files
This commit is contained in:
parent
5321db8f99
commit
26389e4cb2
2 changed files with 8 additions and 9 deletions
|
@ -44,16 +44,15 @@
|
|||
|
||||
<div id="dev_page_content"><p>A user can delete their Telegram account using <a href="/method/account.deleteAccount">account.deleteAccount</a>. </p>
|
||||
<pre><code>---functions---
|
||||
<a href='/method/account.deleteAccount'>account.deleteAccount</a>#a2c0cf74 flags:<a href='/type/%23'>#</a> reason:<a href='/type/string'>string</a> password:flags.0?<a href='/type/InputCheckPasswordSRP'>InputCheckPasswordSRP</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<a href='/method/account.deleteAccount'>account.deleteAccount</a>#a2c0cf74 flags:<a href='/type/%23'>#</a> reason:<a href='/type/string'>string</a> password:flags.0?<a href='/type/InputCheckPasswordSRP'>InputCheckPasswordSRP</a> = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
<a href='/method/account.confirmPhone'>account.confirmPhone</a>#5f2178c3 phone_code_hash:<a href='/type/string'>string</a> phone_code:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;
|
||||
<a href='/method/account.sendConfirmPhoneCode'>account.sendConfirmPhoneCode</a>#1b3faa88 hash:<a href='/type/string'>string</a> settings:<a href='/type/CodeSettings'>CodeSettings</a> = <a href='/type/auth.SentCode'>auth.SentCode</a>;</code></pre>
|
||||
<p>Calling this method while specifying the account's <a href="/api/srp">2FA password</a> (if one is set) will <strong>immediately delete the Telegram account</strong>. </p>
|
||||
<p>If the account has a <a href="/api/srp">2FA password</a> but the user doesn't remember it, <a href="/api/srp#password-reset">password reset may be requested first »</a>, or otherwise, the <code>password</code> field may simply be left empty. </p>
|
||||
<p>In this case, if the account's <a href="/api/srp">2FA password</a> was modified more than 7 days ago and was active in the last 7 days, <strong>account deletion will be delayed for 7 days</strong>.<br>
|
||||
A <a href="/constructor/updateServiceNotification">service message will be sent to the user</a>, containing a link in one of the following formats:</p>
|
||||
<ul>
|
||||
<li><code>https://telegram.me/confirmphone?phone=XXX&hash=YYYY</code></li>
|
||||
<li><code>tg://confirmphone?phone=XXX&hash=YYYY</code></li>
|
||||
</ul>
|
||||
<p>When clicked, <a href="/method/account.sendConfirmPhoneCode">account.sendConfirmPhoneCode</a> must be called with the specified <code>hash</code>, using the account with the specified <code>phone</code> number.
|
||||
<p>In this case, if the account's <a href="/api/srp">2FA password</a> was modified more than 7 days ago and was active in the last 7 days, <strong>account deletion will be delayed for 7 days</strong>. </p>
|
||||
<p>A <a href="/constructor/updateServiceNotification">service message will be sent to the user</a>, containing a <a href="/api/links#phone-confirmation-links">phone number confirmation link »</a>.</p>
|
||||
<p>When such a link is clicked, <a href="/method/account.sendConfirmPhoneCode">account.sendConfirmPhoneCode</a> must be called with the specified <code>hash</code>, using the account with the specified <code>phone</code> number.
|
||||
This will send a phone number verification code to the phone number associated with the account.
|
||||
The phone code settings are the same as for the <a href="/api/auth">login code</a>, and <a href="/method/auth.cancelCode">auth.cancelCode</a> with <a href="/method/auth.resendCode">auth.resendCode</a> can be used as well, to resend or cancel the phone code as for the <a href="/api/auth">login code</a>.</p>
|
||||
<p>Once the SMS code is received, the <a href="/method/account.confirmPhone">account.confirmPhone</a> method will have to be called with the SMS code and the phone hash received from the <a href="/method/account.sendConfirmPhoneCode">account.sendConfirmPhoneCode</a> method.</p>
|
||||
|
|
|
@ -173,7 +173,7 @@ The encoding simply consist of the DC ID in two-byte signed little-endian form;
|
|||
<p>Two keys are extracted from both initialization payloads, using bytes at offsets <code>8-40</code>: the key extracted from the primary payload is used as encryption key, the key extracted from the secondary payload is used as decryption key.</p>
|
||||
<p>Two IVs are extracted from both initialization payloads, using bytes at offsets <code>40-56</code>: the IV extracted from the primary payload is used as encryption IV, the IV extracted from the secondary payload is used as decryption IV.</p>
|
||||
<p><strong>Only if using MTProxy</strong>, the secret is used to provide connection with the MTProxy server.
|
||||
The secret is a 16-byte string, usually distributed in its hexadecimal form along with the MTProxy host and port.</p>
|
||||
The secret is a 16-byte string, usually distributed in its hexadecimal form along with the MTProxy host and port in <a href="/api/links#mtproxy-links">proxy deep links »</a>.</p>
|
||||
<p>Often, a 17-byte version of the secret can be found: this simply indicates that the client should use a specific MTProto transport (based on the first byte, usually it's <code>0xdd</code>, to indicate that the padded intermediate protocol should be used <code>0xdddddddd</code>; however, clients should default to the padded intermediate transport whenever an additional byte in the secret is encountered).</p>
|
||||
<p>The extracted encryption and decryption keys must be concatenated with the secret (the first byte of which should be ignored if it's the 17-byte version), and the SHA256 hash of such string should be used as encryption/decryption key.</p>
|
||||
<p>The obtained encryption and decryption key/IV pairs must then be used with <strong>AES-256-CTR</strong> to encrypt and decrypt all outgoing and incoming payloads.</p>
|
||||
|
|
Loading…
Reference in a new issue