Mint a portal API JWT
curl --request POST \
--url https://syvon.ai/api/auth/api-token \
--cookie next-auth.session-token=import requests
url = "https://syvon.ai/api/auth/api-token"
headers = {"cookie": "next-auth.session-token="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'next-auth.session-token='}};
fetch('https://syvon.ai/api/auth/api-token', 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://syvon.ai/api/auth/api-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "next-auth.session-token=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://syvon.ai/api/auth/api-token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "next-auth.session-token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://syvon.ai/api/auth/api-token")
.header("cookie", "next-auth.session-token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://syvon.ai/api/auth/api-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'next-auth.session-token='
response = http.request(request)
puts response.read_body{
"token": "<string>"
}API Reference — Auth
Mint a portal API JWT
From a signed-in session (magic link / Google / Apple cookie). The JWT is user-scoped and lives ~1 hour; refresh via POST /api/auth/refresh.
POST
/
api
/
auth
/
api-token
Mint a portal API JWT
curl --request POST \
--url https://syvon.ai/api/auth/api-token \
--cookie next-auth.session-token=import requests
url = "https://syvon.ai/api/auth/api-token"
headers = {"cookie": "next-auth.session-token="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'next-auth.session-token='}};
fetch('https://syvon.ai/api/auth/api-token', 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://syvon.ai/api/auth/api-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "next-auth.session-token=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://syvon.ai/api/auth/api-token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "next-auth.session-token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://syvon.ai/api/auth/api-token")
.header("cookie", "next-auth.session-token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://syvon.ai/api/auth/api-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'next-auth.session-token='
response = http.request(request)
puts response.read_body{
"token": "<string>"
}⌘I