curl --request POST \
--url https://laso.finance/revokeAgentApiKey \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"userId": "usr_7aff81763cae58c936aa6de67dd5a95e",
"keyId": "3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a"
}
}
'import requests
url = "https://laso.finance/revokeAgentApiKey"
payload = { "data": {
"userId": "usr_7aff81763cae58c936aa6de67dd5a95e",
"keyId": "3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a"
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
userId: 'usr_7aff81763cae58c936aa6de67dd5a95e',
keyId: '3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a'
}
})
};
fetch('https://laso.finance/revokeAgentApiKey', 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://laso.finance/revokeAgentApiKey",
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([
'data' => [
'userId' => 'usr_7aff81763cae58c936aa6de67dd5a95e',
'keyId' => '3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://laso.finance/revokeAgentApiKey"
payload := strings.NewReader("{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"keyId\": \"3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://laso.finance/revokeAgentApiKey")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"keyId\": \"3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://laso.finance/revokeAgentApiKey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"keyId\": \"3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {}
}Revoke an API key
Revokes one lasoak_ API key, the same action as Revoke on the dashboard. A revoked key can no longer be exchanged for a session at agentAuth, and its MCP event subscriptions stop. A session already minted from the key is not cut off: its id_token lasts out its hour. Revoking a key that is already revoked succeeds and changes nothing.
To revoke a key you hold the raw value of, you can instead POST it as token to /oauth/revoke (RFC 7009) without looking up its keyId.
A Firebase callable. Callables wrap the request in {"data": ...} and the reply in {"result": ...}. Send the id_token from /auth as a Bearer token. Free.
curl --request POST \
--url https://laso.finance/revokeAgentApiKey \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"userId": "usr_7aff81763cae58c936aa6de67dd5a95e",
"keyId": "3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a"
}
}
'import requests
url = "https://laso.finance/revokeAgentApiKey"
payload = { "data": {
"userId": "usr_7aff81763cae58c936aa6de67dd5a95e",
"keyId": "3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a"
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
userId: 'usr_7aff81763cae58c936aa6de67dd5a95e',
keyId: '3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a'
}
})
};
fetch('https://laso.finance/revokeAgentApiKey', 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://laso.finance/revokeAgentApiKey",
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([
'data' => [
'userId' => 'usr_7aff81763cae58c936aa6de67dd5a95e',
'keyId' => '3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://laso.finance/revokeAgentApiKey"
payload := strings.NewReader("{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"keyId\": \"3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://laso.finance/revokeAgentApiKey")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"keyId\": \"3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://laso.finance/revokeAgentApiKey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"keyId\": \"3f1c9a0e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c1e3b5d7f9a1c3e5b7d9f0a\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {}
}Authorizations
Firebase ID token from /auth or any paid route, sent as a Bearer token: Authorization: Bearer <id_token> (the Bearer prefix is required).
Body
Show child attributes
Show child attributes
Response
The key is revoked. Nothing is returned.
Was this page helpful?