A read-only token for the public sandbox
curl --request POST \
--url https://api.apsio.io/v1/sandbox/token \
--header 'apsio-sandbox: <apsio-sandbox>'import requests
url = "https://api.apsio.io/v1/sandbox/token"
headers = {"apsio-sandbox": "<apsio-sandbox>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'apsio-sandbox': '<apsio-sandbox>'}};
fetch('https://api.apsio.io/v1/sandbox/token', 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.apsio.io/v1/sandbox/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"apsio-sandbox: <apsio-sandbox>"
],
]);
$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.apsio.io/v1/sandbox/token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("apsio-sandbox", "<apsio-sandbox>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apsio.io/v1/sandbox/token")
.header("apsio-sandbox", "<apsio-sandbox>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/sandbox/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apsio-sandbox"] = '<apsio-sandbox>'
response = http.request(request)
puts response.read_body{
"token": "<string>",
"token_type": "Bearer",
"expires_at": "<string>",
"project_id": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}API reference
A read-only token for the public sandbox
A project token for the public sandbox (the Apsio Sandbox organization and its example project, synthetic data), without an account. It reads that one project through the read endpoints and nothing else; every write route refuses it. Short-lived and rate-limited per client. Send Apsio-Sandbox: 1.
POST
/
sandbox
/
token
A read-only token for the public sandbox
curl --request POST \
--url https://api.apsio.io/v1/sandbox/token \
--header 'apsio-sandbox: <apsio-sandbox>'import requests
url = "https://api.apsio.io/v1/sandbox/token"
headers = {"apsio-sandbox": "<apsio-sandbox>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'apsio-sandbox': '<apsio-sandbox>'}};
fetch('https://api.apsio.io/v1/sandbox/token', 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.apsio.io/v1/sandbox/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"apsio-sandbox: <apsio-sandbox>"
],
]);
$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.apsio.io/v1/sandbox/token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("apsio-sandbox", "<apsio-sandbox>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apsio.io/v1/sandbox/token")
.header("apsio-sandbox", "<apsio-sandbox>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/sandbox/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apsio-sandbox"] = '<apsio-sandbox>'
response = http.request(request)
puts response.read_body{
"token": "<string>",
"token_type": "Bearer",
"expires_at": "<string>",
"project_id": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Headers
Must be 1. A custom header, so a browser page on another site cannot mint without a CORS preflight.
Available options:
1