List your tokens
curl --request GET \
--url https://api.benchgen.com/api/tokens/ \
--cookie sessionid=import requests
url = "https://api.benchgen.com/api/tokens/"
headers = {"cookie": "sessionid="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'sessionid='}};
fetch('https://api.benchgen.com/api/tokens/', 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.benchgen.com/api/tokens/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "sessionid=",
]);
$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.benchgen.com/api/tokens/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "sessionid=")
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.benchgen.com/api/tokens/")
.header("cookie", "sessionid=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benchgen.com/api/tokens/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'sessionid='
response = http.request(request)
puts response.read_body{
"scopes_available": [
"<string>"
],
"tokens": [
{
"id": 123,
"name": "<string>",
"token_preview": "bgn_...h3Xw",
"scopes": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"is_active": true
}
]
}Authentication and tokens
List your tokens
Never returns secrets, only previews. Also returns scopes_available: the scopes THIS account may put on a new token.
GET
/
api
/
tokens
/
List your tokens
curl --request GET \
--url https://api.benchgen.com/api/tokens/ \
--cookie sessionid=import requests
url = "https://api.benchgen.com/api/tokens/"
headers = {"cookie": "sessionid="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'sessionid='}};
fetch('https://api.benchgen.com/api/tokens/', 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.benchgen.com/api/tokens/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "sessionid=",
]);
$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.benchgen.com/api/tokens/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "sessionid=")
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.benchgen.com/api/tokens/")
.header("cookie", "sessionid=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benchgen.com/api/tokens/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'sessionid='
response = http.request(request)
puts response.read_body{
"scopes_available": [
"<string>"
],
"tokens": [
{
"id": 123,
"name": "<string>",
"token_preview": "bgn_...h3Xw",
"scopes": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"is_active": true
}
]
}Authorizations
sessioninteractiveToken
Interactive browser session, the sessionid cookie Django sets when you sign in to the web app (benchgen.com). To script this endpoint, sign in in a browser and copy the sessionid cookie from DevTools > Application > Cookies. The recommended path is simply the web app itself: Profile Settings > Platform API tokens. Platform tokens are deliberately refused here (403), so a leaked token can never mint successors.
Last modified on September 10, 2026