curl --request GET \
--url https://apimonaco.xyz/api/v1/compliance/regionimport requests
url = "https://apimonaco.xyz/api/v1/compliance/region"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apimonaco.xyz/api/v1/compliance/region', 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://apimonaco.xyz/api/v1/compliance/region",
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://apimonaco.xyz/api/v1/compliance/region"
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://apimonaco.xyz/api/v1/compliance/region")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimonaco.xyz/api/v1/compliance/region")
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{
"restricted": false,
"country": "JP"
}Get the caller's region status
Get the caller’s region status.
Reports whether Monaco is available in the caller’s region, so a frontend can show a region notice instead of failing on the next call. Public endpoint — no authentication required — and always answers 200. Over REST it answers from restricted regions too: GET on this path is the one request the production edge lets through. Over gRPC the edge refuses a restricted caller with HTTP 451 before it reaches this RPC, so clients that need the notice should call the REST endpoint. Every other endpoint refuses callers from a restricted region with 451 REGION_RESTRICTED (gRPC: PERMISSION_DENIED with a google.rpc.ErrorInfo reason REGION_RESTRICTED).
curl --request GET \
--url https://apimonaco.xyz/api/v1/compliance/regionimport requests
url = "https://apimonaco.xyz/api/v1/compliance/region"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apimonaco.xyz/api/v1/compliance/region', 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://apimonaco.xyz/api/v1/compliance/region",
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://apimonaco.xyz/api/v1/compliance/region"
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://apimonaco.xyz/api/v1/compliance/region")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimonaco.xyz/api/v1/compliance/region")
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{
"restricted": false,
"country": "JP"
}Response
OK
True when Monaco is not available in the caller's region; every other endpoint then answers 451 REGION_RESTRICTED
false
The caller's ISO 3166-1 alpha-2 country code as the edge geolocated it (T1 for Tor, XX for unknown); empty when the request carried no location
"JP"
Was this page helpful?

