curl --request POST \
--url https://v1.api.altostrat.io/fault/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expire_after_minutes": 60
}
'import requests
url = "https://v1.api.altostrat.io/fault/token"
payload = { "expire_after_minutes": 60 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expire_after_minutes: 60})
};
fetch('https://v1.api.altostrat.io/fault/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://v1.api.altostrat.io/fault/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expire_after_minutes' => 60
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/fault/token"
payload := strings.NewReader("{\n \"expire_after_minutes\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/fault/token")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expire_after_minutes\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/fault/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expire_after_minutes\": 60\n}"
response = http.request(request)
puts response.read_body{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"type": "jwt",
"expires_in_minutes": 60,
"expires_at": "2025-10-21T13:00:00.000000Z",
"short_link": "https://altostr.at/aBcDeFg"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'message' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "authentication_error",
"code": "api_key_invalid",
"message": "The provided API key is invalid.",
"doc_url": "https://docs.altostrat.io/errors/api_key_invalid"
}{
"type": "permission_error",
"code": "permission_denied",
"message": "You do not have the required scope to perform this action.",
"doc_url": "https://docs.altostrat.io/errors/permission_denied"
}{
"type": "api_error",
"code": "internal_server_error",
"message": "An internal error occurred. Please try again or contact support if the issue persists.",
"doc_url": "https://docs.altostrat.io/errors/internal_server_error"
}Generate a temporary access token
Generates a short-lived JSON Web Token (JWT) that can be used to provide temporary, read-only access to specific fault data, typically for embedding in external dashboards.
curl --request POST \
--url https://v1.api.altostrat.io/fault/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expire_after_minutes": 60
}
'import requests
url = "https://v1.api.altostrat.io/fault/token"
payload = { "expire_after_minutes": 60 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expire_after_minutes: 60})
};
fetch('https://v1.api.altostrat.io/fault/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://v1.api.altostrat.io/fault/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expire_after_minutes' => 60
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/fault/token"
payload := strings.NewReader("{\n \"expire_after_minutes\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/fault/token")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expire_after_minutes\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/fault/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expire_after_minutes\": 60\n}"
response = http.request(request)
puts response.read_body{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"type": "jwt",
"expires_in_minutes": 60,
"expires_at": "2025-10-21T13:00:00.000000Z",
"short_link": "https://altostr.at/aBcDeFg"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'message' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "authentication_error",
"code": "api_key_invalid",
"message": "The provided API key is invalid.",
"doc_url": "https://docs.altostrat.io/errors/api_key_invalid"
}{
"type": "permission_error",
"code": "permission_denied",
"message": "You do not have the required scope to perform this action.",
"doc_url": "https://docs.altostrat.io/errors/permission_denied"
}{
"type": "api_error",
"code": "internal_server_error",
"message": "An internal error occurred. Please try again or contact support if the issue persists.",
"doc_url": "https://docs.altostrat.io/errors/internal_server_error"
}Authorizations
API requests are authenticated using a JSON Web Token (JWT) provided in the Authorization header.
Body
Specifies the duration for which the token will be valid.
The number of minutes from now that the token should expire.
1 <= x <= 4320060
Response
The generated access token and its metadata.
A temporary access token object.
The JSON Web Token.
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
The type of token.
"jwt"
The number of minutes until the token expires.
60
The exact timestamp when the token will expire.
"2025-10-21T13:00:00.000000Z"
A shortened URL that embeds the token for easy sharing.
"https://altostr.at/aBcDeFg"
Was this page helpful?