TuCloudAPI authpoll: Difference between revisions
TuCloudAPI reference (generated from func=help): authrequest relays login_code, authpoll names denied |
TuCloudAPI reference (generated from func=help; ringinuse 2026-10-31) |
||
| Line 2: | Line 2: | ||
== Description == | == Description == | ||
Has the user authorized the magic link? PUBLIC, like authrequest. Until then, returns magiclogin's own status: pending (no decision yet), or the terminal denied (the user refused on the link page), expired and consumed. On success it creates the session, sets the HttpOnly+Secure+SameSite=Strict cookie and returns the context the SPA hydrates from. The response carries NO token and NO ukey: the id is in the cookie, and the tenant key never leaves this service. | Has the user authorized the magic link? PUBLIC, like authrequest. Until then, returns magiclogin's own status: pending (no decision yet), or the terminal denied (the user refused on the link page), expired and consumed. On success it creates the session, sets the HttpOnly+Secure+SameSite=Strict cookie and returns the context the SPA hydrates from. The response carries NO token and NO ukey: the id is in the cookie, and the tenant key never leaves this service. The identity is the PBX administrator (kind pbx) or, with the tucloud_login search, the sec_user the e-mail belongs to (kind user). | ||
== Call == | == Call == | ||
| Line 18: | Line 18: | ||
== Response == | == Response == | ||
{ok, status, remaining} for pending, denied, expired and consumed; on success {ok, pbx, pbx_id, root, admin_ext_id, identity, is_admin, idle_timeout} plus Set-Cookie. | {ok, status, remaining} for pending, denied, expired and consumed; on success {ok, pbx, pbx_id, root, admin_ext_id, identity, is_admin, idle_timeout, identity_kind ("pbx" | "user"), 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. | ||
---- | ---- | ||
Back to [[TuCloudAPI]] | Back to [[TuCloudAPI]] | ||
[[Category:TuCloudAPI SuperRoot]][[Category:TuCloudAPI Operator]][[Category:TuCloudAPI Client]][[Category:TuCloudAPI]] | [[Category:TuCloudAPI SuperRoot]][[Category:TuCloudAPI Operator]][[Category:TuCloudAPI Client]][[Category:TuCloudAPI]] | ||
Latest revision as of 11:47, 31 October 2026
TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: SuperRoot, Operator, Client.
Description
Has the user authorized the magic link? PUBLIC, like authrequest. Until then, returns magiclogin's own status: pending (no decision yet), or the terminal denied (the user refused on the link page), expired and consumed. On success it creates the session, sets the HttpOnly+Secure+SameSite=Strict cookie and returns the context the SPA hydrates from. The response carries NO token and NO ukey: the id is in the cookie, and the tenant key never leaves this service. The identity is the PBX administrator (kind pbx) or, with the tucloud_login search, the sec_user the e-mail belongs to (kind user).
Call
https://tucloudapi.7kas.com:9087/tucloud?func=authpoll&ukey=YOUR_KEY
GET, or POST with the parameters form-urlencoded in the body. Requires the ukey parameter.
Parameters
| Parameter | Type | Required | Default | Meaning |
|---|---|---|---|---|
session_code |
string | Yes | — | The code returned by authrequest. |
Example
https://tucloudapi.7kas.com:9087/tucloud?func=authpoll&session_code=XXXX
Response
{ok, status, remaining} for pending, denied, expired and consumed; on success {ok, pbx, pbx_id, root, admin_ext_id, identity, is_admin, idle_timeout, identity_kind ("pbx" | "user"), 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.
Back to TuCloudAPI