List API keys
List all API keys for the authenticated user.
GET
/auth/api-keys
List all API keys for the authenticated user.
Authentication
API Key (header: X-API-Key) API Key (cookie: better-auth.session_token)
Responses
200
List of API keys
application/jsonapi_keys
object[]
REQUIRED
Array of:
id
string
REQUIRED
org_id
string
REQUIRED
env_id
string
REQUIRED
name
string
REQUIRED
prefix
string
REQUIRED
scopes
string
REQUIRED
last_used_at
string | null
REQUIRED
created_at
string
REQUIRED
revoked_at
string | null
REQUIRED
401
Unauthorized
curl -X GET 'https://hookstream.io/v1/auth/api-keys' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://hookstream.io/v1/auth/api-keys', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://hookstream.io/v1/auth/api-keys', headers=headers)print(response.json())
package mainimport ( "fmt" "io" "net/http")func main() { req, _ := http.NewRequest("GET", "https://hookstream.io/v1/auth/api-keys", nil) req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN") resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() result, _ := io.ReadAll(resp.Body) fmt.Println(string(result))}
200
Response
{ "api_keys": [ { "id": "<string>", "org_id": "<string>", "env_id": "<string>", "name": "<string>", "prefix": "<string>", "scopes": "<string>", "last_used_at": "<string>", "created_at": "<string>", "revoked_at": "<string>" } ]}
API Playground
Try this endpoint
GET
/auth/api-keys