Quick Login
curl --request POST \
--url https://{host}/Agent/Account/QuickLogin \
--header 'Content-Type: application/json' \
--header 'Referer: <referer>' \
--data '{
"seconds": 123
}'import requests
url = "https://{host}/Agent/Account/QuickLogin"
payload = { "seconds": 123 }
headers = {
"Referer": "<referer>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Referer: '<referer>', 'Content-Type': 'application/json'},
body: JSON.stringify({seconds: 123})
};
fetch('https://{host}/Agent/Account/QuickLogin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/Agent/Account/QuickLogin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'seconds' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Referer: <referer>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/Agent/Account/QuickLogin"
payload := strings.NewReader("{\n \"seconds\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Referer", "<referer>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/Agent/Account/QuickLogin")
.header("Referer", "<referer>")
.header("Content-Type", "application/json")
.body("{\n \"seconds\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/Agent/Account/QuickLogin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Referer"] = '<referer>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"seconds\": 123\n}"
response = http.request(request)
puts response.read_body{
"jwt": "<string>",
"userName": "<string>",
"expires": "2023-11-07T05:31:56Z"
}Accounts
Quick Login
Allows the client to authenticate itself with the API using a Quick-Login.
POST
/
Agent
/
Account
/
QuickLogin
Quick Login
curl --request POST \
--url https://{host}/Agent/Account/QuickLogin \
--header 'Content-Type: application/json' \
--header 'Referer: <referer>' \
--data '{
"seconds": 123
}'import requests
url = "https://{host}/Agent/Account/QuickLogin"
payload = { "seconds": 123 }
headers = {
"Referer": "<referer>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Referer: '<referer>', 'Content-Type': 'application/json'},
body: JSON.stringify({seconds: 123})
};
fetch('https://{host}/Agent/Account/QuickLogin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/Agent/Account/QuickLogin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'seconds' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Referer: <referer>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/Agent/Account/QuickLogin"
payload := strings.NewReader("{\n \"seconds\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Referer", "<referer>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/Agent/Account/QuickLogin")
.header("Referer", "<referer>")
.header("Content-Type", "application/json")
.body("{\n \"seconds\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/Agent/Account/QuickLogin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Referer"] = '<referer>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"seconds\": 123\n}"
response = http.request(request)
puts response.read_body{
"jwt": "<string>",
"userName": "<string>",
"expires": "2023-11-07T05:31:56Z"
}Overview
Allows the client to authenticate itself with the API using a Quick-Login. performed in the current HTTP Session. This method is an alternative to the Login and WwwLogin resources. Note: To be able to access the current session, cookies must be enabled. Note 2: Community Login is demonstrated in the link above, as it uses Quick-Login in session mode. API documentation for Quick-Login can be found here: QuickLogin API Documentation. You need to have the Community Package installed for the Community Login to be available. Note 3: It is assumed the Agent API account resides on the same broker. The Agent API is an HTTP REST API for using an XMPP account on an XMPP broker. Once you have made a Quick-Login in a broker, you can use the RemoteQuickLogin resource to perform session logins on other brokers using the QuickLogin on the current broker, providing the JWT token obtained from the current broker. If authentication succeeds, a JSON Web Token (or JWT) is returned to the client. This token can be used as a Bearer token in subsequent calls to the API. It needs to be refreshed before it expires.Authentication
No authentication required.Notes
This endpoint uses the request schema notation described in Pattern matching.Headers
Your application's HTTPS URL, for example https://app.example.com/. Include this header on every Agent API request, including backend calls, login, and account creation. Browser clients must use a referrer policy that sends the application origin. See /neuron-api/api-basics#required-referer-header.
Body
application/json
Required range:
x <= 3600