Check authentication
curl --request GET \
--url https://brokers.newyorkcityservers.com/api/v1/auth-check \
--header 'Authorization: Bearer <token>'import requests
url = "https://brokers.newyorkcityservers.com/api/v1/auth-check"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://brokers.newyorkcityservers.com/api/v1/auth-check', 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://brokers.newyorkcityservers.com/api/v1/auth-check",
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://brokers.newyorkcityservers.com/api/v1/auth-check"
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://brokers.newyorkcityservers.com/api/v1/auth-check")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brokers.newyorkcityservers.com/api/v1/auth-check")
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{
"success": true,
"data": {
"message": "API authentication successful",
"broker": {
"id": "41bb428c-bd24-445e-83de-388388ff593d",
"company_name": "Example Broker",
"email": "[email protected]",
"created_at": "2026-03-01T10:00:00.000Z"
},
"api_key": {
"name": "Production Integration",
"created_at": "2026-04-01T09:30:00.000Z",
"last_used_at": "2026-04-11T12:45:00.000Z",
"scopes": [
"services:read"
],
"mode": "live"
},
"permissions": {
"has_services_read": true,
"has_admin_access": false,
"service_count": 12
},
"security_info": {
"broker_isolation": "All queries automatically filtered by broker_id",
"scope_enforcement": "API operations limited by assigned scopes",
"resource_verification": "Ownership verified before resource access"
},
"timestamp": "2026-04-11T13:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "authentication_failed",
"message": "Invalid API key"
}
}{
"success": false,
"error": {
"code": "insufficient_permissions",
"message": "IP address not whitelisted"
}
}{
"success": false,
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"success": false,
"error": {
"code": "server_error",
"message": "Internal server error"
}
}General API Access Check
Verify general API authentication and return broker, key, and permission details.
GET
/
v1
/
auth-check
Check authentication
curl --request GET \
--url https://brokers.newyorkcityservers.com/api/v1/auth-check \
--header 'Authorization: Bearer <token>'import requests
url = "https://brokers.newyorkcityservers.com/api/v1/auth-check"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://brokers.newyorkcityservers.com/api/v1/auth-check', 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://brokers.newyorkcityservers.com/api/v1/auth-check",
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://brokers.newyorkcityservers.com/api/v1/auth-check"
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://brokers.newyorkcityservers.com/api/v1/auth-check")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brokers.newyorkcityservers.com/api/v1/auth-check")
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{
"success": true,
"data": {
"message": "API authentication successful",
"broker": {
"id": "41bb428c-bd24-445e-83de-388388ff593d",
"company_name": "Example Broker",
"email": "[email protected]",
"created_at": "2026-03-01T10:00:00.000Z"
},
"api_key": {
"name": "Production Integration",
"created_at": "2026-04-01T09:30:00.000Z",
"last_used_at": "2026-04-11T12:45:00.000Z",
"scopes": [
"services:read"
],
"mode": "live"
},
"permissions": {
"has_services_read": true,
"has_admin_access": false,
"service_count": 12
},
"security_info": {
"broker_isolation": "All queries automatically filtered by broker_id",
"scope_enforcement": "API operations limited by assigned scopes",
"resource_verification": "Ownership verified before resource access"
},
"timestamp": "2026-04-11T13:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "authentication_failed",
"message": "Invalid API key"
}
}{
"success": false,
"error": {
"code": "insufficient_permissions",
"message": "IP address not whitelisted"
}
}{
"success": false,
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"success": false,
"error": {
"code": "server_error",
"message": "Internal server error"
}
}Verify that an API key can authenticate. Any valid Live or Sandbox key can use this operation without a feature scope.
Read Verify API Access to choose the correct check and follow the recommended verification sequence.
Last modified on August 2, 2026
⌘I

