Docs / API: Keys
Revoke the current key
Revokes the key and turns off all its rules. This cannot be undone.
DELETE/api/v1/me
| Property | Value |
|---|---|
| Authentication | Required. Send Authorization: Bearer <key>. |
| Rate-limit cost | 0 units |
| Status | Live |
#Request
curl -s -X DELETE "https://farbeamlabs.com/api/v1/me" \
-H "Authorization: Bearer $FARBEAM_KEY"const res = await fetch("https://farbeamlabs.com/api/v1/me", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.FARBEAM_KEY}` }
});
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/me",
headers={"Authorization": f"Bearer {os.environ['FARBEAM_KEY']}"},
timeout=30,
)
body = res.json()
if "error" in body:
raise RuntimeError(body["error"]["code"])
print(body["data"])#Errors
| HTTP | Code | Meaning |
|---|---|---|
| 401 | missing_key | The request has no key. |
| 401 | invalid_key | The key is unknown or revoked. |
All errors share one format. See errors.