Skip to main content

Interface: CreateApiKeyResponse

Gala Launchpad SDK 9.0.0-rc.5


Gala Launchpad SDK 9.0.0-rc.5 / index / CreateApiKeyResponse

Interface: CreateApiKeyResponse

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:284

Response when creating a new API key. CRITICAL: rawKey is ONLY returned on creation and never again!

Example​

const result = await sdk.createApiKey({ role: 'MODERATOR' });
console.log('Save this key:', result.rawKey); // Only chance to see it!
// rawKey format: "glp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Extends​

Properties​

createdAt​

createdAt: string

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:269

Creation timestamp (ISO 8601)

Inherited from​

ApiKeyData.createdAt


delegateAllTokens​

delegateAllTokens: boolean

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:255

Whether key has access to all owner's tokens

Inherited from​

ApiKeyData.delegateAllTokens


description​

description: string | null

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:246

User's description/label

Inherited from​

ApiKeyData.description


expiresAt​

expiresAt: string | null

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:265

Expiration timestamp (ISO 8601) or null if never expires

Inherited from​

ApiKeyData.expiresAt


id​

id: number

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:242

Unique identifier

Inherited from​

ApiKeyData.id


keyPrefix​

keyPrefix: string

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:244

First 8 characters for identification (e.g., "glp_abc1")

Inherited from​

ApiKeyData.keyPrefix


lastUsedAt​

lastUsedAt: string | null

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:267

Last time key was used (ISO 8601) or null if never used

Inherited from​

ApiKeyData.lastUsedAt


rawKey​

rawKey: string

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:292

The full API key - ONLY shown once on creation! Format: glp_{base64url_encoded_random_bytes} Example: "glp_abc1234defghijklmnopqrstuvwxyz012345678"

CRITICAL: Store this securely - it cannot be retrieved again!


role​

role: ApiKeyRole

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:248

Role determining permissions

Inherited from​

ApiKeyData.role


sourceType​

sourceType: ApiKeySource

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:253

Indicates whether the key holder owns tokens (OWNER) or only has moderator access (MODERATOR).

Since​

9.1.0

Inherited from​

ApiKeyData.sourceType


tokenNames​

tokenNames: string[] | null

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:257

List of specifically delegated token names (null if delegateAllTokens is true)

Inherited from​

ApiKeyData.tokenNames


tokenPermissions?​

optional tokenPermissions?: Record<string, Permission[]> | null

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:263

Per-token permission overrides (null if no overrides set). Maps tokenName to Permission[].

Since​

5.8.0

Inherited from​

ApiKeyData.tokenPermissions


updatedAt​

updatedAt: string

Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:271

Last update timestamp (ISO 8601)

Inherited from​

ApiKeyData.updatedAt