Docs / API: Keys
Revoke a key
Revokes one key of this account. Needs a session. Rules stay with the account.
DELETE/api/v1/keys/{id}
| Property | Value |
|---|---|
| Authentication | Needs a wallet session. Sign in at the console. |
| Rate-limit cost | 0 units |
| Status | Live |
#Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Key id. |
#Request
curl -s -X DELETE "https://farbeamlabs.com/api/v1/keys/<id>"const res = await fetch("https://farbeamlabs.com/api/v1/keys/<id>", {
method: "DELETE"
});
const { data, meta, error } = await res.json();
if (error) throw new Error(`${error.code}: ${error.message}`);
console.log(data);import os, requests
res = requests.delete(
"https://farbeamlabs.com/api/v1/keys/<id>",
timeout=30,
)
body = res.json()
if "error" in body:
raise RuntimeError(body["error"]["code"])
print(body["data"])#Errors
| HTTP | Code | Meaning |
|---|---|---|
| 401 | sign_in_required | Sign in with a wallet first. |
| 404 | not_found | The item does not exist. |
All errors share one format. See errors.