Api Tokens

Programmatic credentials — mint, verify (bearer + HMAC), rotate, revoke, webhooks, audit.

Endpoints · 10
GET/modules/api-tokens/v1/auditclient.modules.apiTokens.auditLog

ADRI-21 — read the project's verify-audit log (newest first).

auditLog(input?: { tokenKey?: string; limit?: number; }): Promise<{ entries: VerifyAuditEntry[]; }>;
POST/modules/api-tokens/v1/createclient.modules.apiTokens.create
create(input: CreateTokenInput): Promise<CreateTokenResult>;
GET/modules/api-tokens/v1/listclient.modules.apiTokens.list
list(input?: { env?: TokenEnv; }): Promise<{ tokens: TokenInfo[]; }>;
POST/modules/api-tokens/v1/revokeclient.modules.apiTokens.revoke
revoke(input: { key: string; }): Promise<{ ok: true; }>;
POST/modules/api-tokens/v1/rotate-selfrotateApiTokenSelf({ token })

A minted api-token rotates ITSELF: present the token's own full string and get back a fresh successor with the SAME scopes/config; the old token is revoked immediately. Needs NO project credentials.

rotateApiTokenSelf(opts: { baseUrl?: string; token: string }): Promise<RotateSelfResult>
POST/modules/api-tokens/v1/verifyclient.modules.apiTokens.verify
verify(input: { token: string; clientIp: string; }): Promise<VerifyTokenResult>;
POST/modules/api-tokens/v1/verify-signatureclient.modules.apiTokens.verifySignature

ADRI-65 — HMAC signature verify (the secret never travels). The consumer signs the canonical request `METHOD\nPATH\nTIMESTAMP\nNONCE\nbodyHash` with HMAC-SHA256 (bodyHash = sha256hex(body)); pass the parts + the hex signature here. On a bad signature/replay/stale-timestamp the call rejects with AdrifactClientError (status 401, body `{ ok:false, reason }`) — mirror of `verify`. Tokens minted before ADRI-65 are bearer-only (`not_hmac_capable`).

verifySignature(input: VerifySignatureInput): Promise<VerifySignatureResult>;
POST/modules/api-tokens/v1/webhook/clearclient.modules.apiTokens.webhook.clear
clear(): Promise<{ ok: true; deleted: boolean; }>;
GET/modules/api-tokens/v1/webhook/getclient.modules.apiTokens.webhook.get
get(): Promise<TokenWebhookGetResult>;
POST/modules/api-tokens/v1/webhook/setclient.modules.apiTokens.webhook.set

Returns the signingSecret ONCE — store it to verify X-Adrifact-Signature.

set(input: { url: string; }): Promise<{ ok: true; signingSecret: string; }>;
Widgets · 8

Embeddable React components for this App. Click one to preview its UI. Previews render the component only — live data calls are disabled here (wire the Provider's basePath to a connector, as the Console does, to make them functional).