<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Authentication on tgs</title><link>https://garenal1v3.github.io/tgs-cli/reference/commands/auth/</link><description>Recent content in Authentication on tgs</description><generator>Hugo</generator><language>en</language><atom:link href="https://garenal1v3.github.io/tgs-cli/reference/commands/auth/index.xml" rel="self" type="application/rss+xml"/><item><title>tgs login</title><link>https://garenal1v3.github.io/tgs-cli/reference/commands/auth/login/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://garenal1v3.github.io/tgs-cli/reference/commands/auth/login/</guid><description>&lt;h1 id="tgs-login"&gt;tgs login&lt;a class="anchor" href="#tgs-login"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Authenticate with Telegram. The session is saved locally and reused by all subsequent commands.&lt;/p&gt;
&lt;h2 id="synopsis"&gt;Synopsis&lt;a class="anchor" href="#synopsis"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;tgs login [flags]&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="flags"&gt;Flags&lt;a class="anchor" href="#flags"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Flag&lt;/th&gt;
 &lt;th&gt;Short&lt;/th&gt;
 &lt;th&gt;Default&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;--type&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;-T&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;desktop&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Auth method: &lt;code&gt;desktop&lt;/code&gt;, &lt;code&gt;code&lt;/code&gt;, or &lt;code&gt;qr&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;--desktop-dir&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;-d&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;(auto-detect)&lt;/td&gt;
 &lt;td&gt;Path to Telegram Desktop tdata directory&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;--passcode&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;Telegram Desktop local passcode&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;--phone&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;Phone number for &lt;code&gt;code&lt;/code&gt; method&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;--code&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;Verification code (for non-interactive login)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;--password&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;2FA cloud password&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;--profile&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;-p&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;(resolved)&lt;/td&gt;
 &lt;td&gt;Profile name to authenticate into&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Profile resolution order when &lt;code&gt;--profile&lt;/code&gt; is not set: &lt;code&gt;TGS_PROFILE&lt;/code&gt; env → &lt;code&gt;.tgs.yaml&lt;/code&gt; file → &lt;code&gt;&amp;quot;default&amp;quot;&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>tgs logout</title><link>https://garenal1v3.github.io/tgs-cli/reference/commands/auth/logout/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://garenal1v3.github.io/tgs-cli/reference/commands/auth/logout/</guid><description>&lt;h1 id="tgs-logout"&gt;tgs logout&lt;a class="anchor" href="#tgs-logout"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Revoke the current session on Telegram servers and clear local session data.&lt;/p&gt;
&lt;h2 id="synopsis"&gt;Synopsis&lt;a class="anchor" href="#synopsis"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;tgs logout [flags]&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="flags"&gt;Flags&lt;a class="anchor" href="#flags"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Flag&lt;/th&gt;
 &lt;th&gt;Short&lt;/th&gt;
 &lt;th&gt;Default&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;--profile&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;-p&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;(resolved)&lt;/td&gt;
 &lt;td&gt;Profile to log out from&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Profile resolution order when &lt;code&gt;--profile&lt;/code&gt; is not set: &lt;code&gt;TGS_PROFILE&lt;/code&gt; env → &lt;code&gt;.tgs.yaml&lt;/code&gt; file → &lt;code&gt;&amp;quot;default&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="examples"&gt;Examples&lt;a class="anchor" href="#examples"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#abb2bf;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#7f848e"&gt;# Logout the current profile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;tgs &lt;span style="color:#e5c07b"&gt;logout&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#7f848e"&gt;# Logout a specific profile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;tgs &lt;span style="color:#e5c07b"&gt;logout&lt;/span&gt; --profile work&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="output"&gt;Output&lt;a class="anchor" href="#output"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;JSON (default):&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#abb2bf;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{&lt;span style="color:#e06c75"&gt;&amp;#34;profile&amp;#34;&lt;/span&gt;:&lt;span style="color:#98c379"&gt;&amp;#34;default&amp;#34;&lt;/span&gt;,&lt;span style="color:#e06c75"&gt;&amp;#34;status&amp;#34;&lt;/span&gt;:&lt;span style="color:#98c379"&gt;&amp;#34;logged_out&amp;#34;&lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Text (&lt;code&gt;--output text&lt;/code&gt;):&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Logged out (profile: default)&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If the profile is not logged in, the command exits non-zero with an error message.&lt;/p&gt;</description></item></channel></rss>