Get current session
curl --request GET \
--url https://api.avidoai.com/v0/auth/sessionimport requests
url = "https://api.avidoai.com/v0/auth/session"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.avidoai.com/v0/auth/session', 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://api.avidoai.com/v0/auth/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.avidoai.com/v0/auth/session"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.avidoai.com/v0/auth/session")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avidoai.com/v0/auth/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"user": {
"id": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"profilePictureUrl": "<string>",
"banned": true
},
"orgId": "<string>",
"accessToken": "<string>"
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}Authentication
Get current session
Returns the currently authenticated session for cookie-based callers. Used by the apps/app frontend to centralise session validation through the API rather than calling Better Auth directly. Authenticated by Better Auth session cookie on the parent domain — NOT by API key / application id like the rest of the v0 API.
GET
/
v0
/
auth
/
session
Get current session
curl --request GET \
--url https://api.avidoai.com/v0/auth/sessionimport requests
url = "https://api.avidoai.com/v0/auth/session"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.avidoai.com/v0/auth/session', 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://api.avidoai.com/v0/auth/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.avidoai.com/v0/auth/session"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.avidoai.com/v0/auth/session")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avidoai.com/v0/auth/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"user": {
"id": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"profilePictureUrl": "<string>",
"banned": true
},
"orgId": "<string>",
"accessToken": "<string>"
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}