Get current API key information
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.haveibeendrained.org/api/v1/keys/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.haveibeendrained.org/api/v1/keys/me \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.haveibeendrained.org/api/v1/keys/me"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.haveibeendrained.org/api/v1/keys/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "<string>",
"appName": "<string>",
"contactEmail": "<string>",
"rateLimitPerHour": 123,
"createdAt": "<string>",
"lastUsedAt": "<string>",
"isActive": true
},
"timestamp": 123
}{
"success": false,
"error": "<string>",
"timestamp": 123,
"message": "<string>",
"details": "<string>",
"retryAfter": 123
}API Keys
Get current API key information
Retrieve metadata for the API key provided in the request (via X-API-Key header or User-Agent). Returns information without sensitive data.
GET
/
api
/
v1
/
keys
/
me
Get current API key information
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.haveibeendrained.org/api/v1/keys/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.haveibeendrained.org/api/v1/keys/me \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.haveibeendrained.org/api/v1/keys/me"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.haveibeendrained.org/api/v1/keys/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "<string>",
"appName": "<string>",
"contactEmail": "<string>",
"rateLimitPerHour": 123,
"createdAt": "<string>",
"lastUsedAt": "<string>",
"isActive": true
},
"timestamp": 123
}{
"success": false,
"error": "<string>",
"timestamp": 123,
"message": "<string>",
"details": "<string>",
"retryAfter": 123
}Was this page helpful?