Skip to main content

CreateApiKeyResponseDTO

Package: @nauth-toolkit/core Type: DTO (Response)

Returned once when a key is created. The plaintext key is shown only here.

import { CreateApiKeyResponseDTO } from '@nauth-toolkit/nestjs';

Properties​

PropertyTypeRequiredDescription with validation inline
keystringYesFull plaintext API key (shown once; store securely).
apiKeyApiKeyResponseDTOYesSanitized metadata for the created key.

Example​

{
"key": "Zdh-wUDorVIDtYEiW2q1fT5m9jdXxss-cmyZbIZ73Qg",
"apiKey": { "keyId": "550e8400-...", "isActive": true }
}

Used By​