TuCloudAPI authpoll: Difference between revisions
TuCloudAPI reference regenerated from func=help: tenancy rule, pbx notes on every PBX-scoped function, error codes |
TuCloudAPI reference (generated from func=help): authrequest relays login_code, authpoll names denied |
||
| Line 2: | Line 2: | ||
== Description == | == Description == | ||
Has the magic link | 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. | ||
== Call == | == Call == | ||
| Line 18: | Line 18: | ||
== Response == | == Response == | ||
{ok, status} | {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. | ||
---- | ---- | ||
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]] | ||
Revision as of 18:59, 26 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.
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} plus Set-Cookie.
Back to TuCloudAPI