Get authentication status
curl --request GET \
--url https://api.uk.veridox.ai/authentication/statusimport requests
url = "https://api.uk.veridox.ai/authentication/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.uk.veridox.ai/authentication/status', 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.uk.veridox.ai/authentication/status",
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.uk.veridox.ai/authentication/status"
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.uk.veridox.ai/authentication/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uk.veridox.ai/authentication/status")
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{
"type": "user",
"complete": true,
"methods": [
"password"
],
"verification_stage": "email_verified"
}Authentication
Authentication Status
Check the current authentication status and session details.
GET
/
authentication
/
status
Get authentication status
curl --request GET \
--url https://api.uk.veridox.ai/authentication/statusimport requests
url = "https://api.uk.veridox.ai/authentication/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.uk.veridox.ai/authentication/status', 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.uk.veridox.ai/authentication/status",
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.uk.veridox.ai/authentication/status"
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.uk.veridox.ai/authentication/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uk.veridox.ai/authentication/status")
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{
"type": "user",
"complete": true,
"methods": [
"password"
],
"verification_stage": "email_verified"
}Validates an API key and returns information about the authenticated organisation. This endpoint is used for verifying API key validity and retrieving organisation context before making other API calls.
Best Practices
- Key Validation: Call this endpoint when initialising API clients to ensure your credentials are valid.
- Error Handling: Check the
is_activefield to ensure the key hasn’t been revoked. - Caching: Cache validation results briefly (5-10 minutes) to avoid redundant network calls.
- Organisation Context: Use the
organisation_idto validate multi-tenant application context. - Key Permissions: Called with an API key, the response has
typeset toapi_keyand lists the key’s ownpermissions. See Permissions and API Keys.
Response
200 - application/json
Authentication status: type 'user' with session info for a JWT, type 'api_key' with the key's own permissions for an API key, or type 'none' if not authenticated
- Option 1
- Option 2
- Option 3
Available options:
user Example:
"user"
Whether multi-factor authentication is complete
Example:
true
Authentication methods completed for this session
Available options:
password, email-otp, device-trust Example:
["password"]
User verification stage: unverified (password only), email_verified (password + OTP), verified (admin approved), or administrator
Available options:
unverified, email_verified, verified, administrator Example:
"email_verified"
Was this page helpful?
⌘I