<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.7kas.com/index.php?action=history&amp;feed=atom&amp;title=TuCloudAPI_authlogin</id>
	<title>TuCloudAPI authlogin - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.7kas.com/index.php?action=history&amp;feed=atom&amp;title=TuCloudAPI_authlogin"/>
	<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=TuCloudAPI_authlogin&amp;action=history"/>
	<updated>2026-11-07T07:11:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.7kas.com/index.php?title=TuCloudAPI_authlogin&amp;diff=1242&amp;oldid=prev</id>
		<title>Maintenance script: TuCloudAPI reference (generated from func=help; ringinuse 2026-10-31)</title>
		<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=TuCloudAPI_authlogin&amp;diff=1242&amp;oldid=prev"/>
		<updated>2026-10-31T11:47:55Z</updated>

		<summary type="html">&lt;p&gt;TuCloudAPI reference (generated from func=help; ringinuse 2026-10-31)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: &amp;#039;&amp;#039;&amp;#039;SuperRoot, Operator, Client&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The password door. PUBLIC. POST with an application/x-www-form-urlencoded body: login is the username -- the PBX administrator&amp;#039;s tucloud_pbx.email (matched trimmed, lower-cased) or tucloud_pbx.pbxname (exact case), always with tucloud_pbx.password; or a sec_user&amp;#039;s LOGIN or EMAIL column (trimmed, case-insensitive) with its password -- password as typed (never in the URL: refused with invalid_param), captcha optional as in authrequest. Both credential sets are always looked up; the PBX wins when its password matches, else the one active user whose password matches. Success = exactly the authpoll success (Set-Cookie + the context). One failure code, auth_failed, for an unknown e-mail, a wrong password, an inactive user, an ambiguous match and a blocked e-mail alike (10 failures block the e-mail for 10 minutes); rate_limited per IP; captcha_required / captcha_invalid; auth_unavailable when the database could not be asked. OBSOLETE by the operator&amp;#039;s decision of 2026-10-31: it stops working on 2027-01-01 ([SERVICE] authlogin_until) and answers auth_retired from then on; the magic link (authrequest / authpoll) is the door that stays.&lt;br /&gt;
&lt;br /&gt;
== Call ==&lt;br /&gt;
 https://tucloudapi.7kas.com:9087/tucloud?func=authlogin&amp;amp;ukey=YOUR_KEY&lt;br /&gt;
GET, or POST with the parameters form-urlencoded in the body. Requires the &amp;lt;code&amp;gt;ukey&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Parameter !! Type !! Required !! Default !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;login&amp;lt;/code&amp;gt; || string || Yes || — || The username: PBX e-mail or pbxname, or a sec_users login or e-mail. Max 255.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;password&amp;lt;/code&amp;gt; || string || Yes || — || The password, in the POST body only. Max 255.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;captcha&amp;lt;/code&amp;gt; || string || No || — || base64 of the solved authchallenge JSON.&lt;br /&gt;
|}&lt;br /&gt;
== Example ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;POST https://tucloudapi.7kas.com:9087/tucloud?func=authlogin  (body: login=alguien@example.com&amp;amp;password=...&amp;amp;captcha=...)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Response ==&lt;br /&gt;
{ok, pbx, pbx_id, root, admin_ext_id, identity, is_admin, idle_timeout, identity_kind (&amp;quot;pbx&amp;quot; | &amp;quot;user&amp;quot;), login (the e-mail typed, or the sec_users login), name, priv_admin, profiles [{_id, description}], sections [nav ids the session may use; all 25 for kind pbx]} plus Set-Cookie; {ok:false, code} otherwise.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[TuCloudAPI]]&lt;br /&gt;
[[Category:TuCloudAPI SuperRoot]][[Category:TuCloudAPI Operator]][[Category:TuCloudAPI Client]][[Category:TuCloudAPI]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>