Skip to content

Documentation


Documentation / @kizami/db / index / getApiKeyById

Function: getApiKeyById() ​

getApiKeyById(db, params): Promise<{ createdAt: number; createdBy: string; expiresAt: number | null; id: string; keyHash: string; lastUsedAt: number | null; name: string; revokedAt: number | null; scopes: string; tenantId: string; userId: string; } | null>

Defined in: packages/db/src/queries/api-keys.ts:93

Parameters ​

db ​

Database

params ​

id ​

string

tenantId ​

string

Returns ​

Promise<{ createdAt: number; createdBy: string; expiresAt: number | null; id: string; keyHash: string; lastUsedAt: number | null; name: string; revokedAt: number | null; scopes: string; tenantId: string; userId: string; } | null>