Skip to content

Commit e11c5e8

Browse files
committed
chore: document resolving api keys by subject
1 parent b51866c commit e11c5e8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • packages/clerk-js/src/core/modules/apiKeys

packages/clerk-js/src/core/modules/apiKeys/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ export class APIKeys implements APIKeysNamespace {
3939
};
4040
}
4141

42+
/**
43+
* Retrieves a paginated list of API keys.
44+
*
45+
* The subject (owner) is resolved in the following order:
46+
* 1. Explicit `subject` param (user or organization ID)
47+
* 2. Active organization ID
48+
* 3. Current user ID
49+
*/
4250
async getAll(params?: GetAPIKeysParams): Promise<ClerkPaginatedResponse<APIKeyResource>> {
4351
return BaseResource._fetch({
4452
...(await this.#getBaseFapiProxyOptions()),

0 commit comments

Comments
 (0)