curl --request GET \
--url https://api.botshield.ai/operations/secured-accounts/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.botshield.ai/operations/secured-accounts/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.botshield.ai/operations/secured-accounts/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.botshield.ai/operations/secured-accounts/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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://api.botshield.ai/operations/secured-accounts/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.botshield.ai/operations/secured-accounts/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.botshield.ai/operations/secured-accounts/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"data": {
"state": "none",
"fresh_until": "2023-11-07T05:31:56Z"
},
"error": {
"message": "<string>",
"statusCode": 123,
"code": "<string>",
"min_ttl_seconds": 123,
"max_ttl_seconds": 123,
"retryable": true,
"next_step": "<string>",
"violations": [
{
"source": "<string>",
"type": "<string>",
"path": "<string>",
"severity": "<string>",
"value": "<unknown>",
"explanation": "<string>",
"fix": "<string>"
}
],
"reason": "rate",
"bucket": "<string>",
"retry_in": 123,
"limits": {},
"upgrade_url": "<string>"
}
}
}{
"message": "Invalid input provided",
"input": {},
"errors": [
{
"propertyPath": "<string>",
"invalidValue": "<unknown>",
"message": "<string>"
}
]
}{
"error": {
"message": "<string>",
"statusCode": 123
}
}Get Secured Account status
Is this account a Secured Account, and is the person’s recent presence fresh? Returns exactly what the embed widget’s live presence stream reports for the same account, so your server and the page always agree: none (not secured), fresh (secured, recent passkey presence until fresh_until), stale (secured, presence has lapsed — ask for a passkey again). The environment is your API key’s: a bs_dev_… key sees and changes development Secured Accounts only, a bs_prod_… key production only. Server API keys only — site keys (pk_…) are refused.
curl --request GET \
--url https://api.botshield.ai/operations/secured-accounts/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.botshield.ai/operations/secured-accounts/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.botshield.ai/operations/secured-accounts/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.botshield.ai/operations/secured-accounts/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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://api.botshield.ai/operations/secured-accounts/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.botshield.ai/operations/secured-accounts/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.botshield.ai/operations/secured-accounts/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"data": {
"state": "none",
"fresh_until": "2023-11-07T05:31:56Z"
},
"error": {
"message": "<string>",
"statusCode": 123,
"code": "<string>",
"min_ttl_seconds": 123,
"max_ttl_seconds": 123,
"retryable": true,
"next_step": "<string>",
"violations": [
{
"source": "<string>",
"type": "<string>",
"path": "<string>",
"severity": "<string>",
"value": "<unknown>",
"explanation": "<string>",
"fix": "<string>"
}
],
"reason": "rate",
"bucket": "<string>",
"retry_in": 123,
"limits": {},
"upgrade_url": "<string>"
}
}
}{
"message": "Invalid input provided",
"input": {},
"errors": [
{
"propertyPath": "<string>",
"invalidValue": "<unknown>",
"message": "<string>"
}
]
}{
"error": {
"message": "<string>",
"statusCode": 123
}
}Authorizations
Your secret API key (bs_dev_… for development, bs_production_… for production), or a site key (pk_test_… / pk_live_…) when calling from an allowed origin. Create keys in the Console under Settings → Developer Tools.
Query Parameters
Your stable user id for the account (the same platform_user_ref you passed when it was secured). Hashed server-side; never stored or returned. Must be a stable id, not an email address.
1 - 512Response
Current state. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: api_key_required / invalid_api_key (401), partner_not_found (403), presence_requires_user_ref / notarize_ref_must_be_stable (400), presence_unavailable (503, retry).
Show child attributes
Show child attributes
