List Consumer API Keys
curl --request GET \
--url https://api.truthlocks.com/v1/consumer/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.truthlocks.com/v1/consumer/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.truthlocks.com/v1/consumer/api-keys', 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.truthlocks.com/v1/consumer/api-keys",
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://api.truthlocks.com/v1/consumer/api-keys"
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://api.truthlocks.com/v1/consumer/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/consumer/api-keys")
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[
{
"key_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "My integration key",
"prefix": "tlk_abcd1234",
"status": "active",
"scopes": [
"consumer:read",
"consumer:write",
"attestations:mint",
"attestations:read",
"verify:read"
],
"created_at": "2026-03-01T12:00:00Z",
"expires_at": "2026-05-30T12:00:00Z",
"last_used_at": "2026-03-20T09:15:00Z"
}
]{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Consumer (B2C)
List consumer API keys
Returns all API keys for the authenticated consumer. Secrets are never returned in list responses.
GET
/
v1
/
consumer
/
api-keys
List Consumer API Keys
curl --request GET \
--url https://api.truthlocks.com/v1/consumer/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.truthlocks.com/v1/consumer/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.truthlocks.com/v1/consumer/api-keys', 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.truthlocks.com/v1/consumer/api-keys",
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://api.truthlocks.com/v1/consumer/api-keys"
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://api.truthlocks.com/v1/consumer/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/consumer/api-keys")
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[
{
"key_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "My integration key",
"prefix": "tlk_abcd1234",
"status": "active",
"scopes": [
"consumer:read",
"consumer:write",
"attestations:mint",
"attestations:read",
"verify:read"
],
"created_at": "2026-03-01T12:00:00Z",
"expires_at": "2026-05-30T12:00:00Z",
"last_used_at": "2026-03-20T09:15:00Z"
}
]{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Returns all API keys belonging to the authenticated consumer. Secrets are never included in list responses — only the key prefix is shown.
Responses
Authorizations
JWT for user-initiated operations
Response
List of consumer API keys
Human-readable label for the key
First 12 characters of the key, for display purposes
Available options:
active, revoked Permission scopes granted to this key
Keys expire 90 days after creation
Timestamp of the last request made with this key

