NewWacht Bench is live — AI-assisted development for Wacht

listApiAuthApps()

Returns API auth apps configured for the deployment. The SDK unwraps the backend list envelope and returns only the app array.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function listApiApps() {  const client = await wachtClient();  return client.apiKeys.listApiAuthApps({ include_inactive: true });}

Signature

function listApiAuthApps(  options?: {    include_inactive?: boolean;  },): Promise<ApiAuthApp[]>

Parameters

include_inactive?: boolean | undefined;
When `true`, includes inactive apps in the result.

Return value

deployment_id?: string | undefined;
Deployment that owns the app.
app_slug?: string | undefined;
Stable app slug used in app-scoped API auth routes.
name?: string | undefined;
Display name.
key_prefix?: string | undefined;
Key prefix for keys issued under the app.
is_active?: boolean | undefined;
Whether the app is active.
permissions?: string[] | undefined;
App permissions used by API auth authorization.
resources?: string[] | undefined;
Resource patterns attached to the app.
rate_limits?: RateLimit[] | undefined;
Effective app rate-limit rules.
unit?: 'second' | 'minute' | 'hour' | 'day' | undefined;
Rate-limit window unit.
duration?: number | undefined;
Window duration count in `unit`.
max_requests?: number | undefined;
Maximum allowed requests per window.

Behavior

  • Lists API auth apps in the deployment.
  • include_inactive expands results to include inactive apps.

Operational usage

  • Use app slugs from this response for key management and audit methods.
  • Call this first when building app-level admin pages.

Examples

List active apps

import { wachtClient } from '@wacht/nextjs/server';export async function listActiveApiApps() {  const client = await wachtClient();  return client.apiKeys.listApiAuthApps();}

List active and inactive apps

import { wachtClient } from '@wacht/nextjs/server';export async function listAllApiApps() {  const client = await wachtClient();  return client.apiKeys.listApiAuthApps({ include_inactive: true });}

On this page