Listar Chaves de API do Consumidor
curl --request GET \
--url https://api.truthlocks.com/v1/consumer/api-keys \
--header 'Authorization: Bearer <token>'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));import requests
url = "https://api.truthlocks.com/v1/consumer/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)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))
}[
{
"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:00.000Z",
"expires_at": "2026-05-30T12:00:00.000Z",
"last_used_at": "2026-03-20T09:15:00.000Z"
}
]{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Consumidor (B2C)
Listar chaves de API do consumidor
Retorna todas as chaves de API para o consumidor autenticado. Os segredos nunca são retornados nas respostas da lista. Requer uma sessão de consumidor individual autenticada; uma sessão de negócios ou chave de API de espaço de trabalho não pode substituir a identidade do usuário.
GET
/
v1
/
consumer
/
api-keys
Listar Chaves de API do Consumidor
curl --request GET \
--url https://api.truthlocks.com/v1/consumer/api-keys \
--header 'Authorization: Bearer <token>'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));import requests
url = "https://api.truthlocks.com/v1/consumer/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)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))
}[
{
"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:00.000Z",
"expires_at": "2026-05-30T12:00:00.000Z",
"last_used_at": "2026-03-20T09:15:00.000Z"
}
]{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}
